Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- local admins = {
- ["Hatuey_Yael"] = 'Admin';
- ["yaelcoriano123"] = 'Admin';
- ["AltSkittles"] = 'Admin';
- ["Dem_SkittlesDo"] = 'Admin';
- ["unknown"] = 'Admin';
- ["Player1"] = 'Admin';
- ["saltnvinigerchips"] = 'Admin';
- ["qeeeqx"] = 'Admin';
- }
- local part = Instance.new("Part")
- local mesh = Instance.new("SpecialMesh")
- local sound = Instance.new("Sound")
- local part2 = Instance.new("Part")
- local weld2 = Instance.new("Weld")
- local mesh2 = Instance.new("SpecialMesh")
- enabled = true
- ButtonDown = true
- prefix = ";"
- wait(0.1)
- for i,v in pairs(workspace[owner.Name]:GetChildren()) do
- if v:IsA("Accessory") then
- v:Destroy()
- end
- end
- wait(0.1)
- for i,v in pairs(workspace[owner.Name]:GetChildren()) do
- if v:IsA("Accessory") then
- v:Destroy()
- end
- end
- owner.Character.Head.Transparency = 1
- part.Parent = owner.Character.Head
- part.Size = Vector3.new(3.237, 1.909, 1.506)
- part.CanCollide = false
- part2.Size = Vector3.new(2.579, 2.247, 2.27)
- part2.CanCollide = false
- part2.Parent = owner.Character.Head
- mesh2.Parent = part2
- mesh2.MeshId = "rbxassetid://431035980"
- mesh2.TextureId = "rbxassetid://431036179"
- weld2.Part0 = part2
- weld2.Part1 = owner.Character.Head
- weld2.Parent = part2
- sound.Parent = part
- sound.SoundId = "rbxassetid://2778425335"
- sound.MaxDistance = 1000
- sound.Volume = 100
- sound.Looped = true
- sound.PlaybackSpeed = 1
- sound:Play()
- Mouse.KeyDown:connect(function(key)
- if enabled == false then return end
- key = key:lower()
- if key == "r" then
- enabled = false
- local fireball = Instance.new("Part")
- local fire = Instance.new("Fire")
- local bv = Instance.new("BodyVelocity")
- fireball.Shape = "Ball"
- fireball.Material = "Neon"
- fireball.Parent = owner.Character
- fireball.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -5)
- fireball.BrickColor = BrickColor.new("Bright red")
- fire.Parent = fireball
- fire.Heat = 25
- fire.Size = 10
- fire.Color = Color3.new(214, 0, 0)
- fireball.Anchored = true
- fireball.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0, 5, 0)
- bg = Instance.new("BodyGyro", owner.Character.HumanoidRootPart)
- bg.Name = "SkillGyro"
- bg.D = 100
- bg.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
- bp = Instance.new("BodyPosition", owner.Character.HumanoidRootPart)
- bp.Position = owner.Character.HumanoidRootPart.Position
- bp.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- ---
- while ButtonDown == true do
- bg.CFrame = CFrame.new(owner.Character.HumanoidRootPart.Position, Mouse.Hit.p)
- fire.Size = fire.Size + 0.2
- fireball.Size = fireball.Size+Vector3.new(0.1, 0.1, 0.1)
- fireball.CFrame = fireball.CFrame * CFrame.new(0, 0.05, 0)
- wait()
- end
- ---
- fireball.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -5)
- fireball.Anchored = false
- fireball.CanCollide = false
- bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- bv.Velocity = owner.Character.HumanoidRootPart.CFrame.lookVector*100
- bv.Parent = fireball
- if ButtonDown == false then
- bg:remove()
- bp:remove()
- ButtonDown = true
- end
- fireball.Touched:connect(function(hit)
- local humanoid = hit.Parent:FindFirstChild("Humanoid")
- if humanoid ~= nil then
- if hit.Parent.Name ~= owner.Name then
- hit:Destroy()
- end
- end
- wait(10)
- fireball:Destroy()
- end)
- end
- wait(1)
- enabled = true
- end)
- local players = game:GetService("Players")
- for i,v in pairs(players:GetPlayers()) do
- if admins[v.Name] then
- print("An admin is in the server")
- v.Chatted:connect(function(msg)
- if msg:sub(1,6) == prefix.. "play " or msg:sub(1,6) == prefix.. "Play " then
- sound:Stop()
- sound.SoundId = "rbxassetid://" ..msg:sub(7)
- sound:Play()
- elseif msg:sub(1,7) == prefix.. "pitch " or msg:sub(1,7) == prefix.. "Pitch " then
- sound.PlaybackSpeed = msg:sub(8)
- elseif msg:sub(1,8) == prefix.. "volume " or msg:sub(1,8) == prefix.. "Volume " then
- sound.Volume = msg:sub(9)
- elseif msg:sub(1,9) == "distance " or msg:sub(1,9) == "Distance " then
- sound.MaxDistance = msg:sub(10)
- elseif msg:sub(1,7) == prefix.. "break " or msg:sub(1,7) == prefix.. "Break " then
- local plr = players:FindFirstChild(msg:sub(8))
- if plr ~= nil then
- players[msg:sub(8)]:Destroy()
- else
- print("Invalid Player!")
- end
- end
- end)
- end
- end
- Mouse.KeyUp:connect(function(key)
- key = key:lower()
- if key == "r" then
- ButtonDown = false
- end
- end)
- part.Anchored = true
- mesh.Parent = part
- mesh.MeshId = "rbxassetid://2511970016"
- mesh.TextureId = "rbxassetid://2511970101"
- while true do
- wait(0.5)
- for i = 0,1,0.0001 do
- local i2 = 0,1,0.01
- wait()
- part.CFrame = part.CFrame:Lerp(owner.Character.Head.CFrame * CFrame.new(0, 0, 5) * CFrame.Angles(0,math.rad(180),0), i)
- end
- end
Add Comment
Please, Sign In to add comment