Advertisement
Caelm

Hide and Seek Script

Jun 3rd, 2024 (edited)
2,141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.43 KB | None | 0 0
  1. local players = game:GetService("Players")
  2. local localPlr = players.LocalPlayer
  3. local mouse = localPlr:GetMouse()
  4.  
  5. local UILibrary = loadstring(game:HttpGet("https://pastebin.com/raw/V1ca2q9s"))()
  6.  
  7. local window = UILibrary.Load("MOD MENU")
  8.  
  9. local gameTab = window.AddPage("GAME")
  10. local worldTab = window.AddPage("WORLD")
  11. local movementTab = window.AddPage("MOVEMENT")
  12. local visualTab = window.AddPage("VISUAL")
  13.  
  14. --world tab
  15.  
  16. worldTab.AddLabel("WARNING: WILL ONLY APPLY TO YOUR CLIENT")
  17.  
  18. worldTab.AddSlider("GRAVITY", {Min=0, Max=499, Def=196.2}, function(gravity)
  19.     workspace.Gravity = gravity
  20. end)
  21.  
  22. worldTab.AddSlider("TIME", {Min=0, Max=24, Def=14.5}, function(hour)
  23.     game.Lighting.ClockTime = hour
  24. end)
  25.  
  26. --movement tab
  27.  
  28. local clickTpConnection
  29.  
  30. local clickTpToggle = movementTab.AddToggle("CLICK TP", false, function(val) --Click Tp
  31.     if val then
  32.         clickTpConnection = mouse.Button1Up:Connect(function()
  33.             local character = localPlr.Character or localPlr.CharacterAdded:Wait()
  34.             character.HumanoidRootPart.CFrame = mouse.Hit
  35.         end)
  36.     else
  37.         clickTpConnection:Disconnect()
  38.     end
  39. end)
  40.  
  41. local speedSlider = movementTab.AddSlider("WALK SPEED", {Min=0, Max=999, Def=16}, function(speed)
  42.     local character = localPlr.Character or localPlr.CharacterAdded:Wait()
  43.     character.Humanoid.WalkSpeed = speed
  44. end)
  45.  
  46. local jumpSlider = movementTab.AddSlider("JUMP POWER", {Min=0, Max=499, Def=50}, function(power)
  47.     local character = localPlr.Character or localPlr.CharacterAdded:Wait()
  48.     character.Humanoid.UseJumpPower = true
  49.     character.Humanoid.JumpPower = power
  50. end)
  51.  
  52. local infJumpConnection
  53.  
  54. local infJumpToggle = movementTab.AddToggle("INF JUMP", false, function(val)
  55.     if val then
  56.         infJumpConnection = game:GetService("RunService").RenderStepped:Connect(function()
  57.             if not game.Players.LocalPlayer.Character then return end
  58.             if not game.Players.LocalPlayer.Character.Humanoid then return end
  59.  
  60.             if game.Players.LocalPlayer.Character.Humanoid.Jump then
  61.                 game.Players.LocalPlayer.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
  62.             end
  63.         end)
  64.     else
  65.         infJumpConnection:Disconnect()
  66.     end
  67. end)
  68.  
  69. local stalking = false
  70.  
  71. local stalk = movementTab.AddToggle("STALK RANDOM PLAYER", false, function(val)
  72.     if val then
  73.         stalking = true
  74.  
  75.         local ranPlr = players:GetPlayers()[math.random(1, #players:GetPlayers())]
  76.         local ranCharacter = ranPlr.Character or ranPlr.CharacterAdded:Wait()
  77.         task.spawn(function()
  78.             while wait() do
  79.                 local character = localPlr.Character or localPlr.CharacterAdded:Wait()
  80.                 character.PrimaryPart.CFrame = ranCharacter.PrimaryPart.CFrame
  81.  
  82.                 if stalking == false then return end
  83.             end
  84.         end)
  85.     else
  86.         stalking = false
  87.     end
  88. end)
  89.  
  90. local player = game.Players.LocalPlayer
  91. local character = player.Character or player.CharacterAdded:Wait()
  92. local humanoid = character:WaitForChild("Humanoid")
  93. local userInputService = game:GetService("UserInputService")
  94. local runService = game:GetService("RunService")
  95.  
  96. local flying = false
  97. local speed = 50
  98.  
  99. local bodyGyro = Instance.new("BodyGyro")
  100. local bodyVelocity = Instance.new("BodyVelocity")
  101.  
  102. bodyGyro.P = 9e4
  103. bodyGyro.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  104. bodyGyro.cframe = character.PrimaryPart.CFrame
  105.  
  106. bodyVelocity.velocity = Vector3.new(0, 0, 0)
  107. bodyVelocity.maxForce = Vector3.new(9e9, 9e9, 9e9)
  108.  
  109. local function startFlying()
  110.     bodyGyro.Parent = character.PrimaryPart
  111.     bodyVelocity.Parent = character.PrimaryPart
  112.     flying = true
  113. end
  114.  
  115. local function stopFlying()
  116.     bodyGyro.Parent = nil
  117.     bodyVelocity.Parent = nil
  118.     flying = false
  119. end
  120.  
  121. local function onRenderStepped()
  122.     if flying then
  123.         local camera = workspace.CurrentCamera
  124.         local moveDirection = Vector3.new()
  125.  
  126.         if userInputService:IsKeyDown(Enum.KeyCode.W) then
  127.             moveDirection = moveDirection + camera.CFrame.LookVector
  128.         end
  129.         if userInputService:IsKeyDown(Enum.KeyCode.S) then
  130.             moveDirection = moveDirection - camera.CFrame.LookVector
  131.         end
  132.         if userInputService:IsKeyDown(Enum.KeyCode.A) then
  133.             moveDirection = moveDirection - camera.CFrame.RightVector
  134.         end
  135.         if userInputService:IsKeyDown(Enum.KeyCode.D) then
  136.             moveDirection = moveDirection + camera.CFrame.RightVector
  137.         end
  138.         if userInputService:IsKeyDown(Enum.KeyCode.Space) then
  139.             moveDirection = moveDirection + camera.CFrame.UpVector
  140.         end
  141.         if userInputService:IsKeyDown(Enum.KeyCode.LeftShift) then
  142.             moveDirection = moveDirection - camera.CFrame.UpVector
  143.         end
  144.  
  145.         bodyVelocity.velocity = moveDirection * speed
  146.         bodyGyro.cframe = camera.CFrame
  147.     end
  148. end
  149.  
  150. runService.RenderStepped:Connect(onRenderStepped)
  151.  
  152. local flyToggle = movementTab.AddToggle("FLY", false, function(val)
  153.     if val then
  154.         startFlying()
  155.     else
  156.         stopFlying()
  157.     end
  158. end)
  159.  
  160. --visual tab
  161.  
  162. local espToggle = visualTab.AddToggle("ESP", false, function(val)
  163.     if val then
  164.         for _, plr:Player in pairs(players:GetPlayers()) do
  165.             local character = plr.Character or plr.CharacterAdded:Wait()
  166.             local highlight = Instance.new("Highlight", character)
  167.             task.wait()
  168.         end
  169.     else
  170.         for _, plr:Player in pairs(players:GetPlayers()) do
  171.             local character = plr.Character or plr.CharacterAdded:Wait()
  172.             if character:FindFirstChildOfClass("Highlight") then
  173.                 character:FindFirstChildOfClass("Highlight"):Destroy()
  174.             end
  175.             task.wait()
  176.         end
  177.     end
  178. end)
  179.  
  180. --game tab
  181.  
  182. local tagAll = gameTab.AddButton("TAG ALL", function()
  183.     for _, plr in pairs(players:GetPlayers()) do
  184.         if plr.Character then
  185.             local character = localPlr.Character or localPlr.CharacterAdded:Wait()
  186.             character.PrimaryPart.CFrame = plr.Character.PrimaryPart.CFrame
  187.             task.wait(0.2)
  188.         end
  189.     end
  190. end)
  191.  
  192. local creditEsp = gameTab.AddToggle("CREDIT ESP", false, function(val)
  193.     if val then
  194.         for _, part in pairs(workspace.GameObjects:GetChildren()) do
  195.             if part.Name == "Credit" then
  196.                 local highlight = Instance.new("Highlight", part)
  197.                 highlight.FillColor = Color3.new(1,1)
  198.             end
  199.         end
  200.     else
  201.         for _, part in pairs(workspace.GameObjects:GetChildren()) do
  202.             if part.Name == "Credit" then
  203.                 if part:FindFirstChildOfClass("Highlight") then
  204.                     part:FindFirstChildOfClass("Highlight"):Destroy()
  205.                 end
  206.             end
  207.         end
  208.     end
  209. end)
  210.  
  211. local getAllCredits = gameTab.AddButton("GET ALL CREDITS", function()
  212.     for _, part in pairs(workspace.GameObjects:GetChildren()) do
  213.         if part.Name == "Credit" then
  214.             local character = localPlr.Character or localPlr.CharacterAdded:Wait()
  215.             character.PrimaryPart.CFrame = part.CFrame
  216.             task.wait(0.2)
  217.         end
  218.     end
  219. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement