Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- big credit to this video for most of the code shown
- -- https://www.youtube.com/watch?v=B87hxW_vMJI
- -- maybe gonna work on this 2 - 10 days later
- rconsoleprint[[
- commands:
- reset
- rj/rejoin
- neutral
- absoluteneutral
- guards/police/riot
- inmate/prisoner
- ws/walkspeed
- jp/jumppower
- ]]
- local prefix = "mentaladmin;" -- cant change or else itwill break
- game.Players.LocalPlayer.Chatted:Connect(function(msg)
- msg = msg:lower()
- if string.sub(msg,1,12) == prefix then
- local cmd
- local space = string.find(msg," ")
- if space then
- cmd = string.sub(msg,13,space-1)
- else
- cmd = string.sub(msg,13)
- end
- if cmd == "reset" then
- game.Players.LocalPlayer.Character:BreakJoints()
- end
- if cmd == "rj" then
- game:GetService("TeleportService"):Teleport(game.PlaceId, game:GetService("Players").LocalPlayer)
- end
- if cmd == "rejoin" then
- game:GetService("TeleportService"):Teleport(game.PlaceId, game:GetService("Players").LocalPlayer)
- end
- if cmd == "absoluteneutral" then
- game.Players.LocalPlayer.Neutral = true
- end
- if cmd == "guard" then
- local A_1 = "Bright blue"
- local Event = game:GetService("Workspace").Remote.TeamEvent
- Event:FireServer(A_1)
- end
- if cmd == "police" then
- local A_1 = "Bright blue"
- local Event = game:GetService("Workspace").Remote.TeamEvent
- Event:FireServer(A_1)
- end
- if cmd == "guards" then
- local A_1 = "Bright blue"
- local Event = game:GetService("Workspace").Remote.TeamEvent
- Event:FireServer(A_1)
- end
- if cmd == "riot" then
- local A_1 = "Bright blue"
- local Event = game:GetService("Workspace").Remote.TeamEvent
- Event:FireServer(A_1)
- end
- if cmd == "neutral" then
- local A_1 = "Medium stone grey"
- local Event = game:GetService("Workspace").Remote.TeamEvent
- Event:FireServer(A_1)
- end
- if cmd == "prisoners" then
- local A_1 = "Bright orange"
- local Event = game:GetService("Workspace").Remote.TeamEvent
- Event:FireServer(A_1)
- end
- if cmd == "prisoner" then
- local A_1 = "Bright orange"
- local Event = game:GetService("Workspace").Remote.TeamEvent
- Event:FireServer(A_1)
- end
- if cmd == "inmate" then
- local A_1 = "Bright orange"
- local Event = game:GetService("Workspace").Remote.TeamEvent
- Event:FireServer(A_1)
- end
- if cmd == "ws" then
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = string.sub(msg,16,100)
- print(string.sub(msg,16,300))
- end
- if cmd == "walkspeed" then
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = string.sub(msg,23,100)
- print(string.sub(msg,23,300))
- end
- if cmd == "jp" then
- game.Players.LocalPlayer.Character.Humanoid.JumpPower = string.sub(msg,16,100)
- print(string.sub(msg,16,300))
- end
- if cmd == "jumppower" then
- game.Players.LocalPlayer.Character.Humanoid.JumpPower = string.sub(msg,23,300)
- print(string.sub(msg,23,300))
- end
- end
- end)
- function GetPlayer(String)
- local plr = {}
- local strl = String:lower()
- for i, v in pairs(game:GetService("Players"):GetPlayers()) do
- if v.Name:lower():sub(1, #String) == String:lower() then
- table.insert(plr, v)
- end
- end
- if String == "me" then
- table.clear(plr)
- table.insert(plr, game.Players.LocalPlayer)
- end
- if String == "all" then
- for i,v in pairs(game.Players:GetPlayers()) do
- if v.Name ~= game.Players.LocalPlayer.Name then
- table.insert(plr, v)
- end
- end
- end
- return plr
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement