Advertisement
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
- local RealPlayer = Player
- do local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
- --------------------------------------------------------
- local i = 0
- attacking = false
- Player = owner
- char = Player.Character
- HumanoidRootPart = char.HumanoidRootPart
- Head = char.Head
- local tweenService = game:GetService("TweenService")
- local mouse = Player:GetMouse()
- --------------------------------------------------------
- Visualizer = Instance.new("Part", char)
- Visualizer.Name = "Visualizer"
- Visualizer.Anchored = true
- Visualizer.CanCollide = false
- Visualizer.Material = Enum.Material.Neon
- Visualizer.BrickColor = BrickColor.new(348)
- Visualizer.Transparency = 0.9
- Visualizer2 = Instance.new("Part", char)
- Visualizer2.Name = "Visualizer2"
- Visualizer2.Anchored = true
- Visualizer2.CanCollide = false
- Visualizer2.Material = Enum.Material.Neon
- Visualizer2.BrickColor = BrickColor.new(348)
- Visualizer2.Transparency = 0.9
- Visualizer3 = Instance.new("Part", char)
- Visualizer3.Name = "Visualizer3"
- Visualizer3.Anchored = true
- Visualizer3.CanCollide = false
- Visualizer3.Material = Enum.Material.Neon
- Visualizer3.BrickColor = BrickColor.new(348)
- Visualizer3.Transparency = 0.9
- Visualizer4 = Instance.new("Part", char)
- Visualizer4.Name = "Visualizer4"
- Visualizer4.Anchored = true
- Visualizer4.CanCollide = false
- Visualizer4.Material = Enum.Material.Neon
- Visualizer4.BrickColor = BrickColor.new(348)
- Visualizer4.Transparency = 0.9
- Visualizer5 = Instance.new("Part", char)
- Visualizer5.Name = "Visualizer5"
- Visualizer5.Anchored = true
- Visualizer5.CanCollide = false
- Visualizer5.Material = Enum.Material.Neon
- Visualizer5.BrickColor = BrickColor.new(348)
- Visualizer5.Transparency = 0.9
- Sphere = Instance.new("Part", char)
- Sphere.Shape = Enum.PartType.Ball
- Sphere.Name = "Orb1"
- Sphere.Anchored = true
- Sphere.CanCollide = false
- Sphere.Material = Enum.Material.ForceField
- Sphere.BrickColor = BrickColor.new(348)
- InnerSphere = Instance.new("Part", char)
- InnerSphere.Shape = Enum.PartType.Ball
- InnerSphere.Name = "IOrb1"
- InnerSphere.Anchored = true
- InnerSphere.CanCollide = false
- InnerSphere.Material = Enum.Material.Grass
- SBV = Instance.new("BodyVelocity",Sphere)
- SBV2 = Instance.new("BodyVelocity",InnerSphere)
- SBV.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- SBV.P = 5000
- SBV2.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- SBV2.P = 5000
- Sphere2 = Instance.new("Part", char)
- Sphere2.Shape = Enum.PartType.Ball
- Sphere2.Name = "Orb2"
- Sphere2.Anchored = true
- Sphere2.CanCollide = false
- Sphere2.Material = Enum.Material.ForceField
- Sphere2.BrickColor = BrickColor.new(348)
- InnerSphere2 = Instance.new("Part", char)
- InnerSphere2.Shape = Enum.PartType.Ball
- InnerSphere2.Name = "IOrb2"
- InnerSphere2.Anchored = true
- InnerSphere2.CanCollide = false
- InnerSphere2.Material = Enum.Material.Grass
- Song = Instance.new("Sound", Visualizer)
- Song.Name = "Music"
- Song.SoundId = "rbxassetid://3677480387"
- Song.Volume = 5
- Song:Play()
- local LoudnessEvent = Instance.new("RemoteEvent")
- LoudnessEvent.Name = "LoudnessEvent"
- LoudnessEvent.Parent = NLS([==[
- local LoudnessEvent = script.LoudnessEvent
- if owner.Character.Visualizer:FindFirstChild("Music") then
- local Music = owner.Character.Visualizer:WaitForChild("Music")
- game:GetService("RunService").RenderStepped:Connect(function()
- LoudnessEvent:FireServer(owner.Character.Visualizer:FindFirstChild("Music").PlaybackLoudness, Key)
- end)
- end
- ]==],owner.PlayerGui)
- Player.Chatted:Connect(function(message)
- if message:sub(1, 5) == "Play/" then
- Song.SoundId = "rbxassetid://"..message:sub(6)
- Song.PlaybackSpeed = 1
- Song:Play()
- end
- if message:sub(1, 6) == "LPlay/" then
- Song.SoundId = "rbxassetid://"..message:sub(7)
- Song.PlaybackSpeed = 1
- Song.Looped = true
- Song:Play()
- end
- if message:sub(1, 6) == "Pitch/" then
- Song.PlaybackSpeed = message:sub(7)
- end
- if message:sub(1, 7) == "Volume/" then
- Song.Volume = message:sub(8)
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key:lower() == 'q' and attacking ~= true then
- local Target
- if mouse.Target ~= nil then
- if mouse.Target.Parent:FindFirstChild("Head") == nil then
- return
- else
- Sphere.Anchored = false
- InnerSphere.Anchored = false
- TargetT = mouse.Target.Parent
- attacking = true
- end
- end
- end
- end)
- -- Functions
- function dmg(hit)
- if attacking ~= false then
- if hit.Name ~= "Base" then
- if hit:IsDescendantOf(char) ~= true then
- local Clone = hit:Clone()
- Clone.Parent = game.Workspace
- local CBV = Instance.new("BodyVelocity", Clone)
- CBV.Velocity = Vector3.new(Clone.Position.X,Clone.Position.Y+5,Clone.Position.Z) - Clone.Position
- hit:Destroy()
- local Info = TweenInfo.new (1)
- local goal = {Transparency = 1}
- local Tween = tweenService:Create(Clone,Info,goal)
- Tween:Play()
- wait(1)
- Clone:Destroy()
- end
- end
- end
- end
- function Update(PL,Key)
- if Visualizer:FindFirstChild("Music") == nil then
- Song = Instance.new("Sound", Visualizer)
- Song.Name = "Music"
- end
- local p = Visualizer.CFrame * Vector3.new(0.5,0,0)
- local plr = Visualizer.CFrame * Vector3.new(0.95,0,0)
- local pl = Visualizer.CFrame * Vector3.new(-0.5,0,0)
- local pll = Visualizer.CFrame * Vector3.new(-0.95,0,0)
- Visualizer.Size = Visualizer.Size:lerp(Vector3.new(0.5,PL/150+0.1,0.1),.1)
- Visualizer.CFrame = Visualizer.CFrame:lerp(CFrame.new(Head.Position.X,Head.Position.Y+3,Head.Position.Z)*CFrame.Angles(math.rad(HumanoidRootPart.Orientation.X),math.rad(HumanoidRootPart.Orientation.Y),math.rad(HumanoidRootPart.Orientation.Z)),.1)
- Visualizer2.Size = Visualizer2.Size:lerp(Vector3.new(0.4,PL/200+0.1,0.1),.1)
- Visualizer2.Position = Vector3.new(p.x, p.y, p.z)
- Visualizer2.Orientation = Visualizer.Orientation
- Visualizer3.Size = Visualizer3.Size:lerp(Vector3.new(0.4,PL/200+0.1,0.1),.1)
- Visualizer3.Position = Vector3.new(pl.x, pl.y, pl.z)
- Visualizer3.Orientation = Visualizer.Orientation
- Visualizer4.Size = Visualizer4.Size:lerp(Vector3.new(0.4,PL/250+0.1,0.1),.1)
- Visualizer4.Position = Vector3.new(plr.x, plr.y, plr.z)
- Visualizer4.Orientation = Visualizer.Orientation
- Visualizer5.Size = Visualizer5.Size:lerp(Vector3.new(0.4,PL/250+0.1,0.1),.1)
- Visualizer5.Position = Vector3.new(pll.x, pll.y, pll.z)
- Visualizer5.Orientation = Visualizer.Orientation
- if (PL > 500) then
- local particle = Instance.new("Part", game.Workspace)
- particle.Size = Vector3.new(0.5,0.5,0.5)
- particle.Material = Enum.Material.SmoothPlastic
- particle.CanCollide = false
- particle.Transparency = 0.3
- particle.BrickColor = BrickColor.new(348)
- particle.Reflectance = 0.3
- particle.Position = Visualizer.Position
- particle.Orientation = Vector3.new(math.random(0,90),math.random(0,90),math.random(0,90))
- local particlev = Instance.new("BodyVelocity", particle)
- particlev.Velocity = Vector3.new(math.random(-1,1)+0.1*PL/300,math.random(-1,1)+0.1*PL/300,math.random(-1,1)+0.1*PL/300)
- local Info = TweenInfo.new (5)
- local goal = {Transparency = 1,Size = Vector3.new(0,0,0)}
- local Tween = tweenService:Create(particle,Info,goal)
- Tween:Play()
- wait(5)
- particle:Destroy()
- end
- local Speed = 0.01
- local Speed2 = -0.01
- local Object = Sphere
- local Object2 = Sphere2
- local Host = HumanoidRootPart
- local Distance = 5.5
- i = i + 1
- if attacking ~= true then
- Object.CFrame = Host.CFrame - CFrame.fromEulerAnglesXYZ(7, i * Speed, 0) * Vector3.new(0,0,Distance)
- Object.Size = Vector3.new(1,1,1)
- InnerSphere.CFrame = Sphere.CFrame
- InnerSphere.Size = Vector3.new(0.8,0.8,0.8)
- else
- if TargetT:FindFirstChild("Head") == nil then
- Sphere.Anchored = true
- InnerSphere.Anchored = true
- attacking = false
- return
- end
- SBV.Velocity = TargetT:FindFirstChild("Head").Position - Sphere.Position
- SBV2.Velocity = TargetT:FindFirstChild("Head").Position - InnerSphere.Position
- end
- Object2.CFrame = Host.CFrame - CFrame.fromEulerAnglesXYZ(-7, i * Speed2, 0) * Vector3.new(0,0,Distance)
- Object2.Size = Vector3.new(1,1,1)
- InnerSphere2.CFrame = Object2.CFrame
- InnerSphere2.Size = Vector3.new(0.8,0.8,0.8)
- --CFrame.Angles(math.rad(Visualizer.Orientation.X),math.rad(Visualizer.Orientation.Y),math.rad(Visualizer.Orientation.Z)
- --Visualizer.CFrame = Visualizer.CFrame:lerp(CFrame.new(HumanoidRootPart.Position.X,HumanoidRootPart.Position.Y+5,HumanoidRootPart.Position.Z)*CFrame.Angles(math.rad(Visualizer.Orientation.X+1),math.rad(Visualizer.Orientation.Y-2),math.rad(Visualizer.Orientation.Z+2)),.1)-
- end
- Sphere.Touched:connect(dmg)
- LoudnessEvent.OnServerEvent:Connect(function(Plr,PL,Key)
- Update(PL,Key)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement