Advertisement
Aquarius_Raverus

AdminScript

Dec 31st, 2019
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.91 KB | None | 0 0
  1. -- By Dev_Sylvern
  2.  
  3.  
  4. --|| Variables
  5.  
  6. local Players = game:GetService("Players")
  7. local TS = game:GetService("TweenService")
  8.  
  9. local TweeningInfo = TweenInfo.new(
  10.    
  11.     0.7,
  12.     Enum.EasingStyle.Linear,
  13.     Enum.EasingDirection.In,
  14.     0,
  15.     false,
  16.     0  
  17.    
  18. )
  19.  
  20. local GroupId = 3772360
  21.  
  22. local CommandNames = {
  23.    
  24.     ":EnableJump",
  25.     ":DisableJump",
  26.     ":OpenDoor",
  27.     ":CloseDoor",
  28.    
  29. }
  30.  
  31. local Commands = {}
  32.  
  33. --|| Functions
  34.  
  35.  
  36. function Commands.Jump(bool)
  37.     if bool == true then
  38.         for i,v in pairs(game.Workspace:GetChildren()) do
  39.             if v:IsA("Model") and v:FindFirstChild('HumanoidRootPart') then
  40.                 v.Humanoid.JumpPower = 50
  41.             end
  42.             warn('works')
  43.         end
  44.     elseif bool == false then
  45.         for i,v in pairs(game.Workspace:GetChildren()) do
  46.             if v:IsA("Model") and v:FindFirstChild("HumanoidRootPart") then
  47.                 v.Humanoid.JumpPower = 0
  48.             end
  49.         end
  50.         warn('works')
  51.     end
  52. end
  53.  
  54. function Commands.Door(bool)
  55.     if bool == true then
  56.         local Door = game.Workspace:FindFirstChild("MainDoor")
  57.        
  58.         local Open = TS:Create(Door.KeyCardDoor, TweeningInfo, {CFrame = CFrame.new(-3.66, 46.375, -1.791)})
  59.         Open:Play()
  60.  
  61.     elseif bool == false then
  62.         local Door = game.Workspace:FindFirstChild("MainDoor")
  63.  
  64.         local Close = TS:Create(Door.KeyCardDoor, TweeningInfo, {CFrame = CFrame.new(-3.66, 46.375, 10.157)})
  65.         Close:Play()
  66.     end
  67. end
  68.  
  69.  
  70. --|| Execution
  71.  
  72. Players.PlayerAdded:Connect(function(plr)
  73.     if plr:GetRankInGroup(GroupId) >= 12 then
  74.         plr.Chatted:Connect(function(msg)
  75.             if msg:sub(1, CommandNames[1]:len()):lower() == CommandNames[1]:lower() then
  76.                 Commands.Jump(true)
  77.             elseif msg:sub(1, CommandNames[2]:len()):lower() == CommandNames[2]:lower() then
  78.                 Commands.Jump(false)
  79.             elseif msg:sub(1, CommandNames[3]:len()):lower() == CommandNames[3]:lower() then
  80.                 Commands.Door(true)
  81.             elseif msg:sub(1, CommandNames[4]:len()):lower() == CommandNames[4]:lower() then
  82.                 Commands.Door(false)
  83.             end
  84.         end)
  85.     end
  86. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement