1. --TOMQ-SCRIPT-2022-Recustom
  2. -- prevent from being ran more than once
  3. if not _G.ini then
  4. _G.ini = true
  5. local sound = Instance.new("Sound")
  6. sound.SoundId = "rbxassetid://216917652"
  7. sound.Parent = game:GetService("SoundService")
  8. sound:Play()
  9. wait()
  10. game.StarterGui:SetCore("SendNotification", {
  11. Title = "Unanchored To Player"; -- the title (ofc)
  12. Text = "GUI Loaded - F to Hide/Show"; -- what the text says (ofc)
  13. Duration = 5; -- how long the notification should in secounds
  14. })
  15. print "================UNANCHORED TO PLAYER 2022 Remade================"
  16. print "================MADE BY TomQ#6764 2022================"
  17. local heartbeat = game:GetService("RunService").Heartbeat
  18. spawn(function()
  19. while true do heartbeat:Wait()
  20. for i,v in pairs(game.Players:GetPlayers()) do
  21. if v == game.Players.LocalPlayer == false then
  22. game.Players.LocalPlayer.MaximumSimulationRadius = math.pow(math.huge,math.huge)*math.huge
  23. game.Players.LocalPlayer.SimulationRadius = math.pow(math.huge,math.huge)*math.huge
  24. v.MaximumSimulationRadius = 0
  25. v.SimulationRadius = 0
  26. game:GetService("RunService").Stepped:wait()
  27. end
  28. end
  29. end
  30. end)
  31. local Imput = game:GetService("UserInputService")
  32. local Plr = game.Players.LocalPlayer
  33. local Mouse = Plr:GetMouse()
  34. function To(position)
  35. local Chr = Plr.Character
  36. local sound2 = Instance.new("Sound")
  37. sound2.SoundId = "rbxassetid://3398620867"
  38. sound2.Parent = game:GetService("SoundService")
  39. if Chr ~= nil then
  40. for index, part in pairs(game:GetDescendants()) do
  41. if part:IsA("BasePart" or "UnionOperation" or "Model") and part.Anchored == false and part:IsDescendantOf(game.Players.LocalPlayer.Character) == false and part.Name == "Torso" == false and part.Name == "Head" == false and part.Name == "Right Arm" == false and part.Name == "Left Arm" == false and part.Name == "Right Leg" == false and part.Name == "Left Leg" == false and part.Name == "HumanoidRootPart" == false then --// Checks Part Properties
  42. part.CFrame = CFrame.new(position) --TP Part To Mouse
  43. sound2:Play()
  44. if spam == true and part:FindFirstChild("BodyGyro") == nil then
  45. local bodyPos = Instance.new("BodyPosition")
  46. bodyPos.Position = part.Position
  47. bodyPos.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  48. bodyPos.P = 1e6
  49. bodyPos.Parent = part
  50. end
  51. end
  52. end
  53. end
  54. end
  55. Imput.InputBegan:Connect(function(input)
  56. if input.UserInputType == Enum.UserInputType.MouseButton1 and Imput:IsKeyDown(Enum.KeyCode.LeftControl) then
  57. To(Mouse.Hit.p)
  58. end
  59. end)
  60. -- key that opens/closes the ui
  61. local toggle_key = Enum.KeyCode.F
  62. -- function that executes desired code
  63. execute = function(name)
  64. for index, part in pairs(game:GetDescendants()) do
  65. if part:IsA("BasePart" or "UnionOperation" or "Model") and part.Anchored == false and part:IsDescendantOf(game.Players.LocalPlayer.Character) == false and part.Name == "Torso" == false and part.Name == "Head" == false and part.Name == "Right Arm" == false and part.Name == "Left Arm" == false and part.Name == "Right Leg" == false and part.Name == "Left Leg" == false and part.Name == "HumanoidRootPart" == false then --// Checks Part Properties
  66. part.CFrame = CFrame.new(game.workspace[name].Head.Position) --TP Part To User
  67. end
  68. end
  69. end
  70. local uis = game:GetService("UserInputService")
  71. local ts = game:GetService("TweenService")
  72. -- ui functions
  73. fade = function(obj, len, props)
  74. ts:Create(obj, TweenInfo.new(len, Enum.EasingStyle.Sine), props):Play()
  75. end
  76. -- shorthand variables
  77. local u2, c3 = UDim2.new, Color3.fromRGB
  78. local u2f, c3w = u2(1, 0, 1, 0), c3(255, 255, 255)
  79. -- ui init
  80. local g = Instance.new("ScreenGui", game.CoreGui)
  81. local f = Instance.new("Frame", g)
  82. local t = Instance.new("TextLabel", f)
  83. local c = Instance.new("ScrollingFrame", f)
  84. -- core ui styling
  85. local padding = Instance.new("UIPadding", f)
  86. local maxsize = Instance.new("UISizeConstraint", f)
  87. local textsize = Instance.new("UITextSizeConstraint", t)
  88. local listcons = Instance.new("UIListLayout", c)
  89. padding.PaddingBottom = UDim.new(0, 8)
  90. padding.PaddingLeft = UDim.new(0, 15)
  91. padding.PaddingRight = UDim.new(0, 15)
  92. padding.PaddingTop = UDim.new(0, 0)
  93. maxsize.MaxSize = Vector2.new(275, 450)
  94. maxsize.MinSize = Vector2.new(200, 0)
  95. textsize.MaxTextSize = 16
  96. listcons.Padding = UDim.new(0, 3)
  97. -- ui instance properties
  98. g.Name = "unanchor_ui"
  99. g.ResetOnSpawn = false
  100. f.Name = "main"
  101. t.Name = "header"
  102. f.Size = u2(0.165, 0, 0.6, 0)
  103. f.BorderSizePixel = 0
  104. f.BackgroundTransparency = 0.3
  105. f.Position = u2(1, -215, 0.5, -150)
  106. f.BackgroundColor3 = c3()
  107. f.AnchorPoint = Vector2.new(1, 0.5)
  108. f.Position = u2(1, -15, 0.5, 0)
  109. t.Size = u2(1, 0, 0.1, 0)
  110. t.BackgroundTransparency = 1
  111. t.TextColor3 = c3w
  112. t.Font = Enum.Font.GothamBold
  113. t.TextScaled = true
  114. t.TextXAlignment = Enum.TextXAlignment.Center
  115. t.Text = "UNANCHORED Remade 2022 By TomQ#6764"
  116. c.Name = "playerlist"
  117. c.Position = u2(0, 0, 0.1, 0)
  118. c.Size = u2(1, 0, 0.45, 0)
  119. c.BackgroundTransparency = 1
  120. c.BorderSizePixel = 0
  121. c.TopImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
  122. c.BottomImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
  123. c.ScrollingDirection = Enum.ScrollingDirection.Y
  124. c.ScrollBarThickness = 5
  125. c.VerticalScrollBarInset = Enum.ScrollBarInset.ScrollBar
  126. -- playerlist entry ui template
  127. local temp = Instance.new("Frame", f)
  128. temp.Name = "temp"
  129. temp.Visible = false
  130. temp.Size = u2(1, -5, 0, 27)
  131. temp.BackgroundTransparency = 0.5
  132. temp.BorderSizePixel = 0
  133. temp.ClipsDescendants = true
  134. temp.BackgroundColor3 = c3()
  135. local tpad = Instance.new("UIPadding", temp)
  136. tpad.PaddingLeft = UDim.new(0, 5)
  137. tpad.PaddingRight = UDim.new(0, 5)
  138. local tb = Instance.new("TextButton", temp)
  139. tb.Name = "button"
  140. tb.BackgroundTransparency = 1
  141. tb.ZIndex = 5
  142. tb.BorderSizePixel = 0
  143. tb.Text = ""
  144. tb.Size = u2(1, 10, 1, 0)
  145. tb.Position = u2(0, -5, 0, 0)
  146. local tcl = Instance.new("TextLabel", temp)
  147. tcl.Name = "username"
  148. tcl.BackgroundTransparency = 1
  149. tcl.BorderSizePixel = 0
  150. tcl.Size = u2f
  151. tcl.TextColor3 = c3w
  152. tcl.TextXAlignment = Enum.TextXAlignment.Left
  153. tcl.TextScaled = true
  154. tcl.Size = u2(0.6, 0, 1, 0)
  155. tcl.Font = Enum.Font.Gotham
  156. local tcls = Instance.new("UITextSizeConstraint", tcl)
  157. tcls.MaxTextSize = 14
  158. local thumb = Instance.new("ImageLabel", temp)
  159. thumb.Name = "thumb"
  160. thumb.Size = u2(0.35, 0, 0.35, 0)
  161. thumb.SizeConstraint = Enum.SizeConstraint.RelativeXX
  162. thumb.Position = u2(1, 0, 0, -15)
  163. thumb.AnchorPoint = Vector2.new(1, 0)
  164. thumb.BackgroundTransparency = 1
  165. thumb.BorderSizePixel = 0
  166. -- settings ui
  167. local sh = Instance.new("TextLabel", f)
  168. sh.Name = "settings_header"
  169. sh.Size = u2(1, 0, 0.1, 0)
  170. sh.Position = u2(0, 0, 0.55, 0)
  171. sh.BackgroundTransparency = 1
  172. sh.BorderSizePixel = 0
  173. sh.ZIndex = 3
  174. sh.TextColor3 = c3w
  175. sh.Font = Enum.Font.GothamBold
  176. sh.TextScaled = true
  177. sh.TextXAlignment = Enum.TextXAlignment.Center
  178. sh.Text = "SETTINGS"
  179. local shs = Instance.new("UITextSizeConstraint", sh)
  180. shs.MaxTextSize = 16
  181. local items = Instance.new("ScrollingFrame", f)
  182. items.Name = "items"
  183. items.Size = u2(1, 0, 0.35, 0)
  184. items.Position = u2(0, 0, 0.65, 0)
  185. items.BackgroundTransparency = 1
  186. items.BorderSizePixel = 0
  187. items.TopImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
  188. items.BottomImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
  189. items.ScrollingDirection = Enum.ScrollingDirection.Y
  190. items.ScrollBarThickness = 5
  191. items.VerticalScrollBarInset = Enum.ScrollBarInset.ScrollBar
  192. local itemll = Instance.new("UIListLayout", items)
  193. itemll.Padding = UDim.new(0, 3)
  194. createSetting = function(name)
  195. local setting = Instance.new("Frame", items)
  196. setting.Size = u2(1, -5, 0, 27)
  197. setting.BackgroundColor3 = c3()
  198. setting.BackgroundTransparency = 0.5
  199. setting.BorderSizePixel = 0
  200. local spad = tpad:Clone()
  201. spad.Parent = setting
  202. local slab = tcl:Clone()
  203. slab.Name = "label"
  204. slab.Parent = setting
  205. slab.Size = u2(1, 0, 1, 0)
  206. slab.Text = name
  207. local stbt = tb:Clone()
  208. stbt.Parent = setting
  209. stbt.MouseEnter:connect(function()
  210. fade(setting, 0.25, {BackgroundTransparency = 0.8})
  211. end)
  212. stbt.MouseLeave:connect(function()
  213. fade(setting, 0.25, {BackgroundTransparency = 0.5})
  214. end)
  215. items.CanvasSize = u2(0, 0, 0, itemll.AbsoluteContentSize.Y)
  216. return stbt
  217. end
  218. -- settings & functionality
  219. local sound = Instance.new("Sound")
  220. sound.SoundId = "rbxassetid://179235828"
  221. sound.Parent = game:GetService("SoundService")
  222. spam = false
  223. local spamblocks = createSetting("Spam Parts")
  224. spamblocks.MouseButton1Down:connect(function()
  225. spam = not spam
  226. if spam then
  227. fade(spamblocks.Parent.label, 0.25, {TextColor3 = c3(52, 189, 98)})
  228. sound:Play()
  229. -- code to loop here
  230. else
  231. fade(spamblocks.Parent.label, 0.25, {TextColor3 = c3w})
  232. sound:Play()
  233. -- code to break the loop here
  234. end
  235. end)
  236. createSetting("Break Spam").MouseButton1Down:connect(function()
  237. for index, part in pairs(game:GetDescendants()) do
  238. if part:IsA("BasePart" or "UnionOperation" or "Model") and part.Anchored == false and part:IsDescendantOf(game.Players.LocalPlayer.Character) == false and part.Name == "Torso" == false and part.Name == "Head" == false and part.Name == "Right Arm" == false and part.Name == "Left Arm" == false and part.Name == "Right Leg" == false and part.Name == "Left Leg" == false and part.Name == "HumanoidRootPart" == false then --// Checks Part Properties
  239. sound:Play()
  240. if part:FindFirstChild("BodyForce") then
  241. part.BodyForce:Destroy()
  242. end
  243. if part:FindFirstChild("BodyGyro") then
  244. part.BodyGyro:Destroy()
  245. end
  246. if part:FindFirstChild("BodyPosition") then
  247. part.BodyPosition:Destroy()
  248. end
  249. if part:FindFirstChild("BodyThrust") then
  250. part.BodyThrust:Destroy()
  251. end
  252. end
  253. end
  254. end)
  255. freeze = false
  256. local freezeblocks = createSetting("Freeze Parts")
  257. freezeblocks.MouseButton1Down:connect(function()
  258. freeze = not freeze
  259. if freeze then
  260. fade(freezeblocks.Parent.label, 0.25, {TextColor3 = c3(52, 189, 98)})
  261. sound:Play()
  262. print "UTP: Freezed Parts"
  263. for _,part in pairs(workspace:GetChildren()) do
  264. if part:IsA("BasePart" or "UnionOperation" or "Model") and part.Anchored == false and part:IsDescendantOf(game.Players.LocalPlayer.Character) == false and part.Name == "Torso" == false and part.Name == "Head" == false and part.Name == "Right Arm" == false and part.Name == "Left Arm" == false and part.Name == "Right Leg" == false and part.Name == "Left Leg" == false and part.Name == "HumanoidRootPart" == false then --// Checks Part Properties
  265. local bodyPos = Instance.new("BodyPosition")
  266. bodyPos.Position = part.Position
  267. bodyPos.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  268. bodyPos.P = 1e6
  269. bodyPos.Parent = part
  270. end
  271. end
  272. else
  273. fade(freezeblocks.Parent.label, 0.25, {TextColor3 = c3w})
  274. sound:Play()
  275. print "UTP: Thawed Parts"
  276. for _,part in pairs(workspace:GetChildren()) do
  277. if part:IsA("BasePart" or "UnionOperation" or "Model") and part.Anchored == false and part:IsDescendantOf(game.Players.LocalPlayer.Character) == false and part.Name == "Torso" == false and part.Name == "Head" == false and part.Name == "Right Arm" == false and part.Name == "Left Arm" == false and part.Name == "Right Leg" == false and part.Name == "Left Leg" == false and part.Name == "HumanoidRootPart" == false then --// Checks Part Properties
  278. if part:FindFirstChild("BodyPosition") then
  279. part.BodyPosition:Destroy()
  280. end
  281. end
  282. -- code to break the loop here
  283. end
  284. end
  285. end)
  286. createSetting("Remove Accessories Mesh").MouseButton1Down:connect(function()
  287. sound:Play()
  288. local plr = game:GetService("Players").LocalPlayer
  289. local char = plr.Character
  290. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  291. if v:IsA("Accessory") and v.Handle:FindFirstChild("SpecialMesh") then
  292. ag = v.Handle:FindFirstChild("SpecialMesh")
  293. ag:Destroy()
  294. end
  295. end
  296. local plr = game:GetService("Players").LocalPlayer
  297. local char = plr.Character
  298. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  299. if v:IsA("Accessory") and v.Handle:FindFirstChild("Mesh") then
  300. ag = v.Handle:FindFirstChild("Mesh")
  301. ag:Destroy()
  302. end
  303. end
  304. end)
  305. createSetting("Drop Accessories").MouseButton1Down:connect(function()
  306. sound:Play()
  307. for _,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  308. if v:IsA("Accessory") then
  309. v.Handle.Parent = workspace
  310. v.Parent = workspace
  311. end
  312. end
  313. end)
  314. createSetting("Reset").MouseButton1Down:connect(function()
  315. sound:Play()
  316. game.Players.LocalPlayer.Character:BreakJoints()
  317. end)
  318. highlight = false
  319. local highlights = createSetting("Highlight Unanchored")
  320. highlights.MouseButton1Down:connect(function()
  321. highlight = not highlight
  322. if highlight then
  323. fade(highlights.Parent.label, 0.25, {TextColor3 = c3(52, 189, 98)})
  324. sound:Play()
  325. print "UTP: Unanchored Highlighted"
  326. for _,part in pairs(workspace:GetDescendants()) do
  327. if part:IsA("BasePart") and part.Anchored == false and part:IsDescendantOf(game.Players.LocalPlayer.Character) == false and part.Name == "Torso" == false and part.Name == "Head" == false and part.Name == "Right Arm" == false and part.Name == "Left Arm" == false and part.Name == "Right Leg" == false and part.Name == "Left Leg" == false and part.Name == "HumanoidRootPart" == false and part:FindFirstChild("Weld") == nil then --// Checks Part Properties
  328. local selectionBox = Instance.new("SelectionBox")
  329. selectionBox.Adornee = part
  330. selectionBox.Color3 = Color3.new(1,0,0)
  331. selectionBox.Parent = part
  332. end
  333. end
  334. else
  335. fade(highlights.Parent.label, 0.25, {TextColor3 = c3w})
  336. sound:Play()
  337. print "UTP: Unanchored Un-Highlighted"
  338. for _,part in pairs(workspace:GetDescendants()) do
  339. if part:IsA("BasePart") and part.Anchored == false and part:IsDescendantOf(game.Players.LocalPlayer.Character) == false and part.Name == "Torso" == false and part.Name == "Head" == false and part.Name == "Right Arm" == false and part.Name == "Left Arm" == false and part.Name == "Right Leg" == false and part.Name == "Left Leg" == false and part.Name == "HumanoidRootPart" == false and part:FindFirstChild("Weld") == nil then --// Checks Part Properties
  340. if part:FindFirstChild("SelectionBox") then
  341. part.SelectionBox:Destroy()
  342. end
  343. end
  344. end
  345. end
  346. end)
  347. createSetting("Check Other Players").MouseButton1Down:connect(function()
  348. sound:Play()
  349. g = 0
  350. spawn(function()
  351. for i,v in pairs(game.Players:GetPlayers()) do
  352. if v.SimulationRadius > 5555 then
  353. g = g + 1
  354. print(v.Name, "is using Unanchored To Player")
  355. game:GetService("RunService").Stepped:wait()
  356. end
  357. end
  358. print ("Checked all players, found", g ,"using Unanchored To Player")
  359. end)
  360. end)
  361. createSetting("Count Unanchored Parts").MouseButton1Down:connect(function()
  362. sound:Play()
  363. b = 0
  364. for index, part in pairs(game.workspace:GetDescendants()) do
  365. if part:IsA("BasePart") and part.Anchored == false and part:IsDescendantOf(game.Players.LocalPlayer.Character) == false and part.Name == "Torso" == false and part.Name == "Head" == false and part.Name == "Right Arm" == false and part.Name == "Left Arm" == false and part.Name == "Right Leg" == false and part.Name == "Left Leg" == false and part.Name == "HumanoidRootPart" == false and part:FindFirstChild("Weld") == nil then --// Checks Part Properties
  366. b = b + 1
  367. end
  368. end
  369. print ("All parts checked, found", b ,"that are unanchored")
  370. end)
  371. createEntry = function(name, id)
  372. local entry = temp:Clone()
  373. entry.Parent = c
  374. entry.username.Text = name
  375. entry.thumb.Image = game:GetService("Players"):GetUserThumbnailAsync(id, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100)
  376. entry.Visible = true
  377. entry.LayoutOrder = #c:GetChildren()
  378. entry.Name = name
  379. local sound = Instance.new("Sound")
  380. sound.SoundId = "rbxassetid://3398620867"
  381. sound.Parent = game:GetService("SoundService")
  382. -- handle clicking for player
  383. entry.button.MouseButton1Down:connect(function()
  384. execute(name)
  385. sound:Play()
  386. end)
  387. entry.button.MouseEnter:connect(function()
  388. fade(entry, 0.25, {BackgroundTransparency = 0.8})
  389. end)
  390. entry.button.MouseLeave:connect(function()
  391. fade(entry, 0.25, {BackgroundTransparency = 0.5})
  392. end)
  393. end
  394. deleteEntry = function(name)
  395. for _,v in pairs(c:GetChildren()) do
  396. if v.Name == name then
  397. v:Destroy()
  398. end
  399. end
  400. end
  401. -- create entry for client
  402. createEntry(game.Players.LocalPlayer.Name, game.Players.LocalPlayer.UserId)
  403. -- create entries for all other players
  404. for _,v in pairs(game.Players:GetPlayers()) do
  405. if v ~= game.Players.LocalPlayer then
  406. createEntry(v.Name, v.UserId)
  407. end
  408. end
  409. listcons:GetPropertyChangedSignal("AbsoluteContentSize"):connect(function()
  410. c.CanvasSize = u2(0, 0, 0, listcons.AbsoluteContentSize.Y)
  411. end)
  412. itemll:GetPropertyChangedSignal("AbsoluteContentSize"):connect(function()
  413. items.CanvasSize = u2(0, 0, 0, itemll.AbsoluteContentSize.Y)
  414. end)
  415. uis.InputBegan:connect(function(input, gpe)
  416. if not gpe then
  417. if input.KeyCode == toggle_key then
  418. g.Enabled = not g.Enabled
  419. end
  420. end
  421. end)
  422. -- dragging code, ripped from https://devforum.roblox.com/t/draggable-property-is-hidden-on-gui-objects/107689/5
  423. local dragging
  424. local dragInput
  425. local dragStart
  426. local startPos
  427. local function update(input)
  428. local delta = input.Position - dragStart
  429. f.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  430. end
  431. f.InputBegan:Connect(function(input)
  432. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  433. dragging = true
  434. dragStart = input.Position
  435. startPos = f.Position
  436. input.Changed:Connect(function()
  437. if input.UserInputState == Enum.UserInputState.End then
  438. dragging = false
  439. end
  440. end)
  441. end
  442. end)
  443. f.InputChanged:Connect(function(input)
  444. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  445. dragInput = input
  446. end
  447. end)
  448. uis.InputChanged:Connect(function(input)
  449. if input == dragInput and dragging then
  450. update(input)
  451. end
  452. end)
  453. game.Players.PlayerAdded:connect(function(plr)
  454. createEntry(plr.Name, plr.UserId)
  455. end)
  456. game.Players.PlayerRemoving:connect(function(plr)
  457. deleteEntry(plr.Name)
  458. end)
  459. else
  460. print "================ALREADY LOADED================"
  461. local sound = Instance.new("Sound")
  462. sound.SoundId = "rbxassetid://2130284653"
  463. sound.Parent = game:GetService("SoundService")
  464. sound:Play()
  465. game.StarterGui:SetCore("SendNotification", {
  466. Title = "Already Loaded"; -- the title (ofc)
  467. Text = "GUI Already Loaded"; -- what the text says (ofc)
  468. Duration = 5; -- how long the notification should in secounds
  469. })
  470. end