Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- By Dev_Sylvern
- --|| Variables
- local Players = game:GetService("Players")
- local TS = game:GetService("TweenService")
- local TweeningInfo = TweenInfo.new(
- 0.7,
- Enum.EasingStyle.Linear,
- Enum.EasingDirection.In,
- 0,
- false,
- 0
- )
- local GroupId = 3772360
- local CommandNames = {
- ":EnableJump",
- ":DisableJump",
- ":OpenDoor",
- ":CloseDoor",
- }
- local Commands = {}
- --|| Functions
- function Commands.Jump(bool)
- if bool == true then
- for i,v in pairs(game.Workspace:GetChildren()) do
- if v:IsA("Model") and v:FindFirstChild('HumanoidRootPart') then
- v.Humanoid.JumpPower = 50
- end
- warn('works')
- end
- elseif bool == false then
- for i,v in pairs(game.Workspace:GetChildren()) do
- if v:IsA("Model") and v:FindFirstChild("HumanoidRootPart") then
- v.Humanoid.JumpPower = 0
- end
- end
- warn('works')
- end
- end
- function Commands.Door(bool)
- if bool == true then
- local Door = game.Workspace:FindFirstChild("MainDoor")
- local Open = TS:Create(Door.KeyCardDoor, TweeningInfo, {CFrame = CFrame.new(-3.66, 46.375, -1.791)})
- Open:Play()
- elseif bool == false then
- local Door = game.Workspace:FindFirstChild("MainDoor")
- local Close = TS:Create(Door.KeyCardDoor, TweeningInfo, {CFrame = CFrame.new(-3.66, 46.375, 10.157)})
- Close:Play()
- end
- end
- --|| Execution
- Players.PlayerAdded:Connect(function(plr)
- if plr:GetRankInGroup(GroupId) >= 12 then
- plr.Chatted:Connect(function(msg)
- if msg:sub(1, CommandNames[1]:len()):lower() == CommandNames[1]:lower() then
- Commands.Jump(true)
- elseif msg:sub(1, CommandNames[2]:len()):lower() == CommandNames[2]:lower() then
- Commands.Jump(false)
- elseif msg:sub(1, CommandNames[3]:len()):lower() == CommandNames[3]:lower() then
- Commands.Door(true)
- elseif msg:sub(1, CommandNames[4]:len()):lower() == CommandNames[4]:lower() then
- Commands.Door(false)
- end
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement