Advertisement
DrawingJhon

Hide signs / items

Aug 31st, 2022
718
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.38 KB | None | 0 0
  1. local HumanDied = false
  2. local plr = game:GetService("Players").LocalPlayer
  3. local mouse = plr:GetMouse()
  4. local parts = {}
  5.  
  6. local netless = game:GetService("RunService").Heartbeat:Connect(function()
  7.     for i, v in pairs(parts) do
  8.         if v:IsA("BasePart") then
  9.             v.AssemblyLinearVelocity = Vector3.new(-30,0,0)
  10.         end
  11.     end
  12.     sethiddenproperty(plr,"MaximumSimulationRadius",math.huge)
  13.     sethiddenproperty(plr,"SimulationRadius",999999999)
  14. end)
  15.  
  16. local function create(part, parent, p, r)
  17.     local att0 = Instance.new("Attachment", part)
  18.     local att1 = Instance.new("Attachment", parent)
  19.     local alignPos = Instance.new("AlignPosition", part)
  20.     local alignOr = Instance.new("AlignOrientation", part)
  21.    
  22.     att1.Position = p or Vector3.new()
  23.     att1.Orientation = r or Vector3.new()
  24.  
  25.     alignPos.Attachment0 = att0
  26.     alignPos.Attachment1 = att1
  27.     alignPos.MaxForce = 999999999
  28.     alignPos.MaxVelocity = math.huge
  29.     alignPos.ReactionForceEnabled = false
  30.     alignPos.Responsiveness = math.huge
  31.     alignPos.RigidityEnabled = false
  32.  
  33.     alignOr.Attachment0 = att0
  34.     alignOr.Attachment1 = att1
  35.     alignOr.Responsiveness = math.huge
  36.     alignOr.MaxTorque = 999999999
  37. end
  38.  
  39. local mouse = plr:GetMouse()
  40.  
  41. function GetHit()
  42.     local unitRay = mouse.UnitRay
  43.     local params = RaycastParams.new()
  44.     params.FilterDescendantsInstances = {part, unpack(parts)}
  45.     params.FilterType = Enum.RaycastFilterType.Blacklist
  46.     local ray = workspace:Raycast(unitRay.Origin, unitRay.Direction * 99999, params)
  47.     return ray
  48. end
  49.  
  50. local part = Instance.new("Part", plr.Character)
  51. part.Size = Vector3.new(1,1,1)
  52. part.CanCollide = false
  53. part.Position = plr.Character.HumanoidRootPart.Position - Vector3.new(0, 10, 0)
  54. part.Transparency = 0.8
  55. local bv = Instance.new("BodyVelocity", part)
  56. bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  57. bv.Velocity = Vector3.new()
  58.  
  59. local function AddHat(obj, pos, rot)
  60.     local handle = obj.Handle
  61.     handle:BreakJoints()
  62.     spawn(function() local weld = handle:FindFirstChildOfClass("Weld") if weld then weld:Destroy() end end)
  63.     table.insert(parts, handle)
  64.     local mesh = handle:FindFirstChildOfClass("SpecialMesh")
  65.     if mesh then
  66.         mesh:Destroy()
  67.     end
  68.     create(handle, part, pos, rot)
  69. end
  70.  
  71. local off1 = 0
  72. local off2 = 1
  73.  
  74. for i, v in pairs(plr.Character:GetChildren()) do
  75.     if v:IsA("Accessory") and v:FindFirstChild("Handle") then
  76.         if v.Handle.Size == Vector3.new(1, 1, 2) then
  77.             AddHat(v, Vector3.new(-off1, 0, 0), Vector3.new(90, 0, 0))
  78.             off1 = off1 + 1
  79.         end
  80.     end
  81. end
  82.  
  83. for i, v in pairs(plr.Character:GetChildren()) do
  84.     if v:IsA("Accessory") and v:FindFirstChild("Handle") then
  85.         if v.Handle.Size == Vector3.new(1, 1, 1) then
  86.             off2 = off2 + 1
  87.             AddHat(v, Vector3.new(math.floor(off2/2), -0.5 + (off2 % 2), 0))
  88.         end
  89.     end
  90. end
  91.  
  92. local tool = Instance.new("Tool")
  93. tool.Name = "Hide Items"
  94. tool.RequiresHandle = false
  95. tool.CanBeDropped = false
  96. tool.Parent = plr.Backpack
  97.  
  98. game:GetService("UserInputService").InputBegan:Connect(function(input)
  99.     if input.UserInputType ~= Enum.UserInputType.MouseButton1 or tool.Parent ~= plr.Character then return end
  100.     local instance = mouse.Target
  101.     if not instance then return end
  102.     local itemPart = instance.Parent:FindFirstChild("ItemsPart") or instance.Parent:FindFirstChild("Banner")
  103.     if itemPart then
  104.         part.CFrame = itemPart.CFrame
  105.     end
  106. end)
  107.  
  108. local died; died = plr.Character.Humanoid.Died:Connect(function()
  109.     netless:Disconnect()
  110.     died:Disconnect()
  111. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement