Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Fly
- Invis
- PM
- Msg
- Hint
- clear
- sound -- music
- i -- insert
- noclip
- burn
- cape -- yaas
- dogify -- trol no no nopls but fine, i put troll cus i didnt want it was trolling qq
- deerify
- troll -- meses the character up like xrazy
- follow -- same exact thing was walk to palyer way better xd wait would walktoplayer
- spotlight
- rockify -- rolly hting
- -- in as ec, feeind sis
- -- ok lets work on the commands right now, ooookk aay xD
- ]]
- Core = {
- Ranked = {
- ["kert109"] = {Rank = 4;Connections = {}};
- ["fireband12"] = {Rank = 4;Connections = {}};
- };
- Ranks = {
- [-1] = "Bannded";
- [0] = "Guest";
- [1] = "Moderator";
- [2] = "Administrator";
- [3] = "Co-Creator";
- [4] = "Creator";
- };
- Commands = {};
- Objects = {};
- }
- Default = {Rank = 0;Connections = {}}
- connectPlayer = function(Player)
- if Player == nil and not Player:IsA("Player") then
- return false
- end
- local data = Core.Ranked[Player.Name]
- if data == nil then
- Core.Ranked[Player.Name] = {}
- data = Core.Ranked[Player.Name]
- for _,v in pairs(Default) do
- data[_] = v
- end
- end
- for _,c in pairs(data.Connections) do
- c:disconnect()
- end
- if data.Rank >= 0 then
- local con = Player.Chatted:connect(function(m)
- Chatted(Player,m)
- end)
- data.Connections["chatted"] = con
- else
- if data.Rank == -1 then
- Player:Kick()-- use the :kick() yee
- end
- end
- end
- findInTab = function(obj,tab)
- for i,v in pairs(tab) do
- if v == obj then
- return true
- end
- end
- return false
- end
- GetPlayers = function(Speaker,Msg,Exception)
- if Speaker == nil or Msg == nil then
- return game:service'Players':GetPlayers()
- end
- local allPlyrs = {};
- if Msg:lower():sub(1,2) == "me" then
- allPlyrs[#allPlyrs+1] = Speaker
- elseif Msg:lower() == "all" then
- for i,v in pairs(GetPlayers()) do
- allPlyrs[#allPlyrs+1] = v
- end
- elseif Msg:lower():sub(1,7) == "allbut:" then
- local plyr = Msg:lower():sub(8)
- local x = GetPlayers(Speaker,plyr,Exception)
- for i,v in pairs(GetPlayers()) do
- if not findInTab(v,x) then
- allPlyrs[#allPlyrs+1] = v
- end
- end
- elseif Msg:lower():sub(1,5) == "team:" then
- local team = Msg:lower():sub(6)
- for i,v in pairs(game.Teams:children()) do
- if v:lower():sub(1,#team) == team:lower() then
- team = v
- break
- end
- end
- for i,v in pairs(GetPlayers()) do
- if v.TeamColor == team.TeamColor then
- allPlyrs[#allPlyrs+1] = v
- end
- end
- elseif Msg:lower():sub(1,5) == "area:" then
- local num = tonumber(Msg:lower():sub(6))
- for i,v in pairs(GetPlayers()) do
- ypcall(function()
- print((v.Character.Torso.Position-Speaker.Character.Torso.Position).magnitude)
- if (v.Character.Torso.Position-Speaker.Character.Torso.Position).magnitude <= num then
- allPlyrs[#allPlyrs+1] = v
- end
- end)
- end
- elseif Msg:lower() == "others" or Msg:lower() == "other" then
- for i,v in pairs(GetPlayers()) do
- if v.Name ~= Speaker.Name then
- allPlyrs[#allPlyrs+1] = v
- end
- end
- else
- for i,v in pairs(GetPlayers()) do
- if v.Name:lower():sub(1,#Msg) == Msg:lower() then
- allPlyrs[#allPlyrs+1] = v
- end
- end
- end
- if Exception == true then
- for i,v in pairs(allPlyrs) do
- if getRank(v) > getRank(Speaker) then
- v = nil
- end
- end
- end
- return allPlyrs
- end
- getRank = function(Player)
- if Player ~= nil and not Player:IsA("Player") then
- return false
- end
- return Core.Ranked[Player.Name].Rank
- end
- GetCommands = function(Speaker,Message)
- local returnCmds = {}
- for m in Message:gmatch("%/([%w%s%:]+)") do
- local s = m:find(" ")
- if s ~= nil then
- local cmd,msg = m:sub(1,s-1),m:sub(s+1)
- for _,Cmd in pairs(Core.Commands) do
- for i,_cmd in pairs(Cmd.Command) do
- if _cmd:lower():sub(1,#cmd) == cmd:lower() and getRank(Speaker) >= Cmd.Rank then
- returnCmds[#returnCmds+1] = {Cmd,msg}
- end
- end
- end
- end
- end
- return returnCmds
- end
- Chatted = function(Player,Message)
- local Cmds = GetCommands(Player,Message)
- for i,v in pairs(Cmds) do
- local r,e = ypcall(function()
- v[1].Run(Player,v[2])
- end)
- if r == false then print("ERROR:"..e) end
- end
- end
- makeCommand = function(Name,Command,Rank,Desc,Run)
- Core.Commands[Name] = {Name = Name,Command = Command, Rank = Rank, Desc = Desc, Run = Run}
- end
- makeCommand("Kill",{"kill"},1,"Kills the player.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Player.Character:BreakJoints()
- end
- end
- )
- makeCommand("Force Field",{"ff"},1,"Protects the player with a force field.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Instance.new("ForceField",Player.Character)
- end
- end
- )
- makeCommand("No Force Field",{"noff","unff","remff"},1,"Protects the player with a force field.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- for i,v in pairs(Player.Character:children()) do
- if v:IsA("ForceField") then
- v:Destroy()
- end
- end
- end
- end
- )
- makeCommand("Respawn",{"respawn"},1,"Respawns the player with no death penalty.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Player:LoadCharacter()
- end
- end
- )
- makeCommand("Rank",{"rank","admin"},3,"Changes the rank of the player.",
- function(Speaker,Msg)
- local s = Msg:find(" ")
- local Plyr,Rank = Msg:sub(1,s-1),Msg:sub(s+1)
- -- doing the exception here. Look at getplayer code to see what it does
- for _,Player in pairs(GetPlayers(Speaker,Plyr,true)) do
- Core.Ranked[Player.Name].Rank = tonumber(Rank)
- connectPlayer(Player) -- refreshes player
- end
- end
- )
- makeCommand("Teleport",{"tp","teleport"},2,"Teleports the player to the specified player.",
- function(Speaker,Msg)
- local s = Msg:find(" ")
- local Plyr1,Plyr2 = Msg:sub(1,s-1),Msg:sub(s+1)
- for _,Player1 in pairs(GetPlayers(Speaker,Plyr1)) do
- for _,Player2 in pairs(GetPlayers(Speaker,Plyr2)) do
- ypcall(function()
- Player1.Character.Torso.CFrame = Player2.Character.Torso.CFrame
- end)
- end
- end
- end
- )
- makeCommand("God",{"god"},1,"Infinite health for the specified player",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Player.Character.Humanoid.MaxHealth = math.huge
- end
- end
- )
- makeCommand("Ungod",{"ungod"},1,"Regular health for the specified player",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Player.Character.Humanoid.MaxHealth = 100
- end
- end
- )
- makeCommand("Explode",{"explode"},1,"Explodes the specified player",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- local E = Instance.new("Explosion", Player.Character)
- E.Position = Player.Character.Torso.Position
- E.BlastRadius = 10
- E.BlastPressure = 10
- end
- end
- )
- makeCommand("Trip",{"trip"},1,"Trips the player.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Player.Character.Torso.CFrame = Player.Character.Torso.CFrame*CFrame.Angles(math.rad(50),0,0)
- Core.Commands.Sit.Run(Player,Player.Name)
- end
- end
- )
- makeCommand("Kick",{"kick"},1,"Kicks the player.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Player:Kick()
- end
- end
- )
- makeCommand("Freeze",{"freeze","anchor"},1,"Freezes the player.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Player.Character.Torso.Anchored = true
- end
- end
- )
- makeCommand("Thaw",{"thaw","unfreeze","unachored"},1,"Thaws the player.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Player.Character.Torso.Anchored = false
- end
- end
- )
- makeCommand("Jump",{"jump"},1,"Makes the specified player jump.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Player.Character.Humanoid.Jump = true
- end
- end
- )
- makeCommand("Rejoin",{"rejoin"},2,"Rejoins the player.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- game:service'TeleportService':Teleport(game.PlaceId,Player)
- end
- end
- )
- makeCommand("Sit",{"sit"},1,"Makes the player sit.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Player.Character.Humanoid.Sit = true
- end
- end
- )
- makeCommand("WalkSpeed",{"walkspeed","speed","ws"},1,"Changes the speed of the player.",
- function(Speaker,Msg)
- local s = Msg:find(" ")
- local Plyr,Speed = Msg:sub(1,s-1),Msg:sub(s+1)
- -- doing the exception here. Look at getplayer code to see what it does
- for _,Player in pairs(GetPlayers(Speaker,Plyr)) do
- Player.Character.Humanoid.WalkSpeed = tonumber(Speed)
- end
- end
- )
- makeCommand("Place Teleport",{"ptp","placeteleport"},1,"Teleports the player to the id's location.",
- function(Speaker,Msg)
- local s = Msg:find(" ")
- local Plyr,ID = Msg:sub(1,s-1),Msg:sub(s+1)
- -- doing the exception here. Look at getplayer code to see what it does
- for _,Player in pairs(GetPlayers(Speaker,Plyr)) do
- game:service'TeleportService':Teleport(tonumber(ID),Player)
- end
- end
- )
- makeCommand("Fling",{"fling"},1,"Flings the specified player.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- -- do it for all the values
- Player.Character.Torso.CFrame = Player.Character.Torso.CFrame*CFrame.Angles(math.rad(math.random(120,180)),math.rad(math.random(0,360)),0)
- Player.Character.Torso.Velocity = Player.Character.Torso.CFrame.lookVector*100
- Core.Commands.Sit.Run(Player,Player.Name) -- does tht work lol lets find out?
- end
- end
- )
- makeCommand("TimeOfDay",{"timeofday"},2,"Changes the time.",
- function(Speaker,Msg)
- local time = tonumber(Msg)
- if Msg:lower() == "day" then
- time = 14
- elseif Msg:lower() == "night" then
- time = 0
- elseif Msg:lower() == "dusk" then
- time = 6
- end
- game.Lighting.TimeOfDay = time
- end
- )
- makeCommand("Fog",{"fog"},2,"Changes the fog.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- game.Lighting.FogEnd = tonumber(Msg)
- end
- end
- )
- makeCommand("Global Shadows",{"globalshadows","gs"},2,"Enables/Disables Global Shadows.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- game.Lighting.GlobalShadows = not game.Lighting.GlobalShadows
- end
- end
- )
- makeCommand("CharacterAppearance",{"characterappearance", "charapp"},1,"Changes the players appearance to a specified player",
- function(Speaker,Msg)
- local s = Msg:find(" ")
- local Plyrs,ID = Msg:sub(1,s-1),Msg:sub(s+1)
- for _,Player in pairs(GetPlayers(Speaker,Plyrs)) do
- Player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId="..ID.."&placeId="..game.PlaceId
- Player:LoadCharacter()
- end
- end
- )
- makeCommand("Fix",{"fix"},4,"Refreshes/Fixes the scripts.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers()) do
- connectPlayer(Player)
- end
- end
- )
- makeCommand("Unstuck",{"unstuck"},1,"Unsticks the player.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Player.Character:MoveTo(Player.Character:GetModelCFrame().p)
- end
- end
- )
- makeCommand("Clone",{"clone"},2,"Clones the player.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Player.Character.Archivable = true
- local c = Player.Character:Clone()
- c.Parent = workspace
- c:MoveTo(Player.Character:GetModelCFrame().p)
- c:MakeJoints()
- Core.Objects[#Core.Objects+1] = c
- end
- end
- )
- makeCommand("Heal",{"heal"},1,"Heals the player.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers(Speaker,Msg)) do
- Player.Character.Humanoid.Health = Player.Character.Humanoid.MaxHealth
- end
- end
- )
- makeCommand("Portal",{"portal"},2,"Creates a Portal between the player to the specified player.",
- function(Speaker,Msg)
- local s = Msg:find(" ")
- local Plyr1,Plyr2 = Msg:sub(1,s-1),Msg:sub(s+1)
- for _,Player1 in pairs(GetPlayers(Speaker,Plyr1)) do
- for _,Player2 in pairs(GetPlayers(Speaker,Plyr2)) do
- ypcall(function()
- local p1 = Instance.new("Part",Workspace)p1.Anchored = true Instance.new("SpecialMesh",p1).MeshType = "Sphere"
- p1.FormFactor = "Custom";p1.Size = Vector3.new(10,10,.5);p1.BrickColor = BrickColor.new("Bright blue");p1.Transparency = .5;p1.CanCollide = false;
- local p2 = p1:Clone()p2.Parent = Workspace
- game.Debris:AddItem(p1,60)game.Debris:AddItem(p2,60)
- p1.CFrame = Player1.Character.Torso.CFrame*CFrame.new(0,2,-10) p2.CFrame = Player2.Character.Torso.CFrame*CFrame.new(0,2,-10)
- p1.Touched:connect(function(h)
- if h.Parent:FindFirstChild("Humanoid") then
- h.Parent.Torso.CFrame = p2.CFrame*CFrame.new(0,0,5)
- end
- end)
- p2.Touched:connect(function(h)
- if h.Parent:FindFirstChild("Humanoid") then
- h.Parent.Torso.CFrame = p1.CFrame*CFrame.new(0,0,5)
- end
- end)
- end)
- end
- end
- end
- )
- makeCommand("Shutdown",{"shutdown"},3,"Shuts the server down.",
- function(Speaker,Msg)
- for _,Player in pairs(GetPlayers()) do
- Player:Kick()
- end
- end
- )
- makeCommand("Warp",{"warp"},1,"Moves the player forward by X amount.",
- function(Speaker,Msg)
- local s = Msg:find(" ")
- local Plyr,Num = Msg:sub(1,s-1),Msg:sub(s+1)
- for _,Player in pairs(GetPlayers(Speaker,Plyr)) do
- Player.Character.Torso.CFrame = Player.Character.Torso.CFrame*CFrame.new(0,0,-(tonumber(Num)))
- end
- end
- )
- makeCommand("Damage",{"damage", "dmg"},1,"Damages the specified player.",
- function(Speaker,Msg)
- local s = Msg:find(" ")
- local Plyr1,dmg = Msg:sub(1,s-1),Msg:sub(s+1)
- for _,Player in pairs(GetPlayers(Speaker,Plyr1)) do
- Player.Character.Humanoid:TakeDamage(tonumber(dmg))
- end
- end
- )
- makeCommand("Control",{"control"},1,"Controls the specified player.",
- function(Speaker,Msg)
- local s = Msg:find(" ")
- local Plyr1,Plyr2 = Msg:sub(1,s-1),Msg:sub(s+1)
- for _,Player1 in pairs(GetPlayers(Speaker,Plyr1)) do
- for _,Player2 in pairs(GetPlayers(Speaker,Plyr2)) do
- if Player2.Character ~= nil then
- Player1 = Player2.Character
- end
- end
- end
- end
- )
- --[[
- reminder no remove brb
- follow, warp, and spotlight
- ]]
- for i,v in pairs(game.Players:GetPlayers()) do
- connectPlayer(v)
- end
- game.Players.PlayerAdded:connect(function(Player)
- connectPlayer(Player)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement