Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Parent = game.ServerScriptService
- Admins = {"Chxp", "Player", "Player1"}
- RISE = 5
- TURN = -2.5
- FOLLOW = true
- Prefix = ";"
- Orbs = {}
- CS = game:GetService("Chat")
- function Create(Name,Size,Char,LifeLine,Chat)
- local P = Instance.new("Part", Char)
- if P.Parent ~= nil then
- P.Name = Name
- P.FormFactor = "Custom"
- P.Size = Vector3.new(Size,Size,Size)
- P.BrickColor = BrickColor.new("Institutional white")
- P.TopSurface = "Smooth"
- P.BottomSurface = "Smooth"
- P.CanCollide = false
- P.CFrame = CFrame.new(Char.Torso.Position)
- local D = Instance.new("Decal", P)
- D.Texture = "http://www.roblox.com/asset/?id=202384125"
- D.Face = "Front"
- D = Instance.new("Decal", P)
- D.Texture = "http://www.roblox.com/asset/?id=202384125"
- D.Face = "Back"
- local Partical = Instance.new("ParticleEmitter", P)
- Partical.Rate = 1
- Partical.Rotation = NumberRange.new(90,180)
- Partical.RotSpeed = NumberRange.new(30,50)
- Partical.Texture = "http://www.roblox.com/asset/?id=202384125"
- local Mesh = Instance.new("SpecialMesh", P)
- Mesh.MeshType = "Sphere"
- local BP = Instance.new("BodyPosition", P)
- BP.Name = "BP"
- local A = Instance.new("NumberValue", P)
- A.Name = "angle"
- table.insert(Orbs, 1, P)
- repeat wait() until P.Parent
- if Chat then
- CS:Chat(P, Chat, "Blue")
- end
- if LifeLine then
- game:GetService("Debris"):AddItem(P, LifeLine)
- end
- return P
- else
- P:Destroy()
- return nil
- end
- end
- function GetPlr(Msg, Ply)
- local M=false
- local Plys = {}
- local Players = game.Players:GetChildren()
- local x = 1
- for i=1, string.len(Msg) do
- local Str = string.sub(Msg, x, i)
- if string.sub(Msg, i, i) == "," then
- Str = string.sub(Msg, x, i-1)
- for i, Player2 in ipairs(Players) do
- local N = Player2.Name:lower()
- for i=1, string.len(N) do
- local Str2 = string.sub(N, 1, i)
- if Str == "me" then table.insert(Plys, 1, Ply); break end
- if Str == "all" then for i,P in ipairs(game.Players:GetChildren()) do table.insert(Plys, 1, P) end; M=true; break end
- if Str == Str2 then table.insert(Plys, 1, Player2); break end
- end
- if M == true then break end
- end
- x = i+1
- end
- if string.sub(Msg, i, i) == " " then
- Str = string.sub(Msg, x, i-1)
- for i, Player2 in ipairs(Players) do
- local N = Player2.Name:lower()
- for i=1, string.len(N) do
- local Str2 = string.sub(N, 1, i)
- if Str == "me" then table.insert(Plys, 1, Ply); M = true; break end
- if Str == "all" then for i,P in ipairs(game.Players:GetChildren()) do table.insert(Plys, 1, P) end; M=true; break end
- if Str == Str2 then table.insert(Plys, 1, Player2); M = true; break end
- end
- if M == true then break end
- end
- x = i+1
- break
- end
- if i == string.len(Msg) then
- Str = string.sub(Msg, x, i)
- for i, Player2 in ipairs(Players) do
- local N = Player2.Name:lower()
- for i=1, string.len(N) do
- local Str2 = string.sub(N, 1, i)
- if Str == "me" then table.insert(Plys, 1, Ply); M = true; break end
- if Str == "all" then for i,P in ipairs(game.Players:GetChildren()) do table.insert(Plys, 1, P) end; M=true; break end
- if Str == Str2 then table.insert(Plys, 1, Player2); M = true; break end
- end
- if M == true then break end
- end
- x = i+1
- break
- end
- end
- return Plys,string.sub(Msg, x)
- end
- function OnChatted(Msg, Player)
- Msg = Msg:lower()
- if string.sub(Msg, string.len(Prefix)+1, string.len(Prefix)+3) == "tp " then
- local Plrs,Str = GetPlr(string.sub(Msg, 4+string.len(Prefix)), Player)
- local Plrs2,Str = GetPlr(Str, Player)
- if #Plrs >= 1 and #Plrs2 >= 1 then
- for i, P in ipairs(Plrs) do
- P.Character:MoveTo(Plrs2[1].Character.Torso.Position)
- end
- else
- Create("Mess", 2, Player.Character, 5, "Correct useage is: /tp (Player1) (Player2)")
- end
- return
- end
- -- Kill
- if string.sub(Msg, string.len(Prefix)+1, string.len(Prefix)+5) == "kill " then
- local Plrs,Str = GetPlr(string.sub(Msg, 6+string.len(Prefix)), Player)
- for i, P in ipairs(Plrs) do
- coroutine.resume(coroutine.create(function()
- P.Character:LoadCharacter()
- end))
- end
- end
- -- Orb
- if string.sub(Msg, string.len(Prefix)+1, string.len(Prefix)+4) == "orb " then
- local Plrs,Str = GetPlr(string.sub(Msg, 5+string.len(Prefix)), Player)
- for i, P in ipairs(Plrs) do
- coroutine.resume(coroutine.create(function()
- local Orb = Create("Orb", 2, P.Character, nil, "I have come master.")
- local L = Instance.new("SelectionPartLasso", P.Character)
- L.Part = Orb
- L.Humanoid = P.Character.Humanoid
- L.Color = BrickColor.new("Bright blue")
- game:GetService("Debris"):AddItem(L, 5)
- end))
- end
- end
- -- Unorb
- if string.sub(Msg, string.len(Prefix)+1, string.len(Prefix)+6) == "unorb " then
- local Plrs,Str = GetPlr(string.sub(Msg, 7+string.len(Prefix)), Player)
- for i, P in ipairs(Plrs) do
- coroutine.resume(coroutine.create(function()
- if P.Character then
- for x, T in ipairs(P.Character:GetChildren()) do
- if T.Name == "Orb" then T:Destroy() end
- end
- end
- end))
- end
- end
- -- Bypass
- if string.sub(Msg, string.len(Prefix)+1, string.len(Prefix)+6) == "bypass" then
- _G.Sand = nil
- _G.Sand = "Bypassed"
- print("Bypassed")
- end
- end
- game.Players.ChildAdded:connect(function(Player)
- local Character = Player.Character or Player.CharacterAdded:wait()
- local Yus = false
- for i,A in ipairs(Admins) do if A == Player.Name then Yus = true end end
- if Yus then
- Player.Chatted:connect(function(Msg)
- if string.sub(Msg, 1, string.len(Prefix)) == Prefix then
- OnChatted(Msg, Player)
- end
- end)
- Create("Mess",2,Character,8,"You're an admin!")
- end
- for x,P in ipairs(game.Players:GetChildren()) do for i,A in ipairs(Admins) do if A == P.Name or A == P.userId then Create("Halp",2,P.Character,8,Player.Name.." connected.") end end end
- Create("Join",2,Character,8,"Welcome, "..Player.Name.."!")
- end)
- game.Players.ChildRemoved:connect(function(Player)
- for x,P in ipairs(game.Players:GetChildren()) do for i,A in ipairs(Admins) do if A == P.Name or A == P.userId then Create("Halp",2,P.Character,8,Player.Name.." disconnected.") end end end
- end)
- for i,Player in ipairs(game.Players:GetChildren()) do
- coroutine.resume(coroutine.create(function()
- local Character = Player.Character or Player.CharacterAdded:wait()
- local Yus = false
- for i,A in ipairs(Admins) do if A == Player.Name then Yus = true end end
- if Yus then
- Player.Chatted:connect(function(Msg)
- if string.sub(Msg, 1, string.len(Prefix)) == Prefix then
- OnChatted(Msg, Player)
- end
- end)
- Create("Mess",2,Character,8,"You're an admin!")
- end
- for x,P in ipairs(game.Players:GetChildren()) do for i,A in ipairs(Admins) do if A == P.Name or A == P.userId then Create("Halp",2,Player.Character,8,Player.Name.." joined.") end end end
- Create("Join",2,Character,8,"Welcome, "..Player.Name.."!")
- end))
- end
- local Levitated = 0
- local LevitateDir = -1
- local angle = 11.25
- while true do
- wait()
- pcall(function()
- angle = angle+5
- if angle>=360 then angle = 0 end
- Levitated = Levitated + LevitateDir / 20
- if Levitated >= 1 or Levitated <= -1 then
- LevitateDir = -LevitateDir
- end
- for i,Orb in ipairs(Orbs) do
- if Orb.Parent then
- -- Levitation --
- TURN = angle
- if (FOLLOW == true) then
- Orb.BP.position = (CFrame.new(Orb.Parent.Torso.Position.X, Orb.Parent.Torso.Position.Y, Orb.Parent.Torso.Position.Z) * CFrame.Angles(math.rad(0), math.rad(TURN + (360/#Orbs)*i), math.rad(0)) * CFrame.new(1, 1.5, 2*#Orbs)).p + Vector3.new(0, Levitated, 0)
- end
- else
- table.remove(Orbs, i)
- end
- end
- end)
- wait(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement