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 print("FE Compatibility code by Mokiros")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
- function Smooth(part)
- part.TopSurface = "Smooth"
- part.BottomSurface = "Smooth"
- part.RightSurface = "Smooth"
- part.LeftSurface = "Smooth"
- end
- plr = owner
- char = plr.Character
- ra = char["Right Arm"]
- la = char["Left Arm"]
- root = char.HumanoidRootPart
- hum = char.Humanoid
- dancin = false
- clerp = function(toclerp, cf, number)
- local joint = toclerp
- joint.C0 = joint.C0:Lerp(cf, number)
- end
- clerp2 = function(toclerp, cf)
- local joint = toclerp
- joint.C0 = cf
- end
- clerp3 = function(toclerp, cf, number)
- local joint = toclerp
- joint.C1 = joint.C1:Lerp(cf, number)
- end
- Swait,swait = function(number)
- if number == 0 or number == nil then
- game:GetService("RunService").Heartbeat:Wait()
- else
- for i = 1,number do
- game:GetService("RunService").Heartbeat:Wait()
- end
- end
- end
- ezweld = function(p, a, b, cf)
- local weld = Instance.new("Weld",p)
- weld.Part0 = a
- weld.Part1 = b
- weld.C0 = cf
- return weld
- end
- IT = Instance.new
- Rad = math.rad
- Cos = math.cos
- Sin = math.sin
- BrickC = BrickColor.new
- C3 = Color3.new
- VT = Vector3.new
- anim = "Idle"
- attack = false
- local RS = char.Torso["Right Shoulder"]
- local LS = char.Torso["Left Shoulder"]
- local RH = char.Torso["Right Hip"]
- local LH = char.Torso["Left Hip"]
- local neck = char.Torso["Neck"]
- local anim = "Idle"
- local animate = char.Animate
- local root = char.HumanoidRootPart
- local rootj = root.RootJoint
- local timepos = 0
- local sine = 0
- local RSnor = RS.C0
- local LSnor = LS.C0
- local RHnor = RH.C0
- local LHnor = LH.C0
- local RSnor2 = RS.C1
- local LSnor2 = LS.C1
- local RHnor2 = RH.C1
- local LHnor2 = LH.C1
- local rootjnor = rootj.C0
- local necknor = neck.C0
- local tors = char.Torso
- local playstealanim = false
- hold = false
- surfing = false
- mouse = plr:GetMouse()
- hold = false
- Debris = game:GetService("Debris")
- --------------
- moon = Instance.new("Part",char)
- moon.CanCollide = false
- moon.BrickColor = BrickColor.new("Light blue")
- moon.Size = Vector3.new(1, 5.5, 5.5)
- moon.Position = root.Position
- mesh = Instance.new("SpecialMesh",moon)
- mesh.MeshId = "rbxassetid://744297195"
- mesh.Scale = Vector3.new(0.125, 0.125, 0.125)
- moonw = ezweld(char, moon, root, CFrame.new(0, -12, 0) * CFrame.Angles(0, Rad(90), 0))
- moonnor = moonw.C0
- --------------
- local Value = Instance.new("NumberValue",script)
- Value.Name = "Damage"
- Value.Value = 1500
- function Fling(part,damage)
- local BodyThrust = Instance.new("BodyThrust",part)
- BodyThrust.Force = Vector3.new(0,2 * (Value.Value * (damage / 5)),1 * (Value.Value * (damage / 5)))
- delay(0.05,function()
- if BodyThrust then
- BodyThrust:Destroy()
- end
- end)
- end
- maintheme = Instance.new("Sound",moon)
- maintheme.SoundId = "rbxassetid://2762786055"
- maintheme.Volume = 7
- maintheme.Looped = true
- maintheme:Play()
- function Animate(INOUT)
- if INOUT == "In" then
- animate.Parent = char
- elseif INOUT == "Out" then
- for _,v in next, hum:GetPlayingAnimationTracks() do
- v:Stop();
- end
- animate.Parent = nil
- end
- end
- function smasheffect(cf)
- local s = Instance.new("Sound",moon) s.SoundId = "rbxassetid://743521450" s.Volume = 7 s.Pitch = 1.2 s:Play()
- local part = Instance.new("Part",char)
- part.BrickColor = moon.BrickColor
- part.CanCollide = false
- part.Anchored = true
- part.CFrame = cf
- local mesh = Instance.new("SpecialMesh",part)
- mesh.MeshId = "rbxassetid://489415447"
- mesh.Scale = Vector3.new(3, 3, 3)
- coroutine.resume(coroutine.create(function()
- for i = 1,20 do
- Swait()
- part.Transparency = part.Transparency + 0.1
- part.CFrame = cf
- part.Size = Vector3.new(0.1, 0.1, 0.1)
- mesh.Scale = mesh.Scale + Vector3.new(1, 1, 1)
- end
- part:Destroy()
- end))
- end
- function Oof(Ch)
- if Ch.ClassName == "Model" and Ch ~= char then
- local D = Ch:GetDescendants()
- for i = 1,#D do
- local ee = D[i]
- if ee:IsA("Humanoid") then
- ee.BreakJointsOnDeath = false
- elseif ee:IsA("Motor6D") or ee:IsA("Motor") then
- local Old = ee.Parent
- ee.Parent = nil
- local R = Instance.new("Glue",Old)
- R.Name = ee.Name
- R.Part0 = ee.Part0
- R.Part1 = ee.Part1
- R.C0 = ee.C0
- R.C1 = ee.C1
- end
- end
- end
- end
- function Dismember(MAN,DOWHAT)
- local HUM = MAN:FindFirstChildOfClass("Humanoid")
- if HUM then
- HUM.Health = 0
- HUM.PlatformStand = true
- end
- Oof(MAN)
- end
- function blocky(poot)
- Instance.new("SpecialMesh",poot).MeshType = "Brick"
- end
- function Died(Character)
- local owned = Instance.new("NumberValue",Character)
- owned.Name = "owned"
- local Sound = Instance.new("Sound",Character:WaitForChild("Head"))
- Sound.SoundId = "rbxassetid://877221802"
- Sound.EmitterSize = 100
- Sound.MaxDistance = 100000
- if Sound then
- Sound:Play()
- end
- Value.Value = 1500
- local D = Character:GetDescendants()
- local dud = Character
- local Torso = dud:FindFirstChild("Torso") or dud:FindFirstChild("UpperTorso")
- local Humanoid = dud:FindFirstChildOfClass("Humanoid")
- Humanoid.MaxHealth = 200
- for i = 1,#D do
- if D[i]:IsA("BasePart") and D[i]:FindFirstAncestorWhichIsA("Tool") == nil then
- D[i].Anchored = true
- D[i].Transparency = 1
- if D[i] == Humanoid.RootPart then
- local Attachment = Instance.new("Attachment",Humanoid.RootPart)
- Attachment.Rotation = -Humanoid.RootPart.Rotation
- local ParticleEmitter = Instance.new("ParticleEmitter",Attachment)
- ParticleEmitter.Enabled = false
- ParticleEmitter.Texture = "rbxasset://textures/particles/fire_main.dds"
- ParticleEmitter.LightEmission = 0.8
- ParticleEmitter.Color = ColorSequence.new(Torso.Color)
- ParticleEmitter.Size = NumberSequence.new(5,25)
- ParticleEmitter.Transparency = NumberSequence.new(0,1)
- ParticleEmitter.Lifetime = NumberRange.new(1.5)
- ParticleEmitter.Rate = 500
- ParticleEmitter.Rotation = NumberRange.new(-360,360)
- ParticleEmitter.Speed = NumberRange.new(0,0)
- ParticleEmitter.EmissionDirection = Enum.NormalId.Top
- ParticleEmitter:Emit(15)
- end
- end
- end
- end
- function slam()
- attack = true
- Animate("Out")
- local touchy = moon.Touched:connect(function(hit)
- smashed = false
- local dud = hit.Parent
- if not dud:FindFirstChild("smacked") then
- local s = Instance.new("Sound",moon) s.SoundId = "rbxassetid://0" s.Volume = 5 s:Play() Debris:AddItem(s, 1)
- local smacked = Instance.new("NumberValue",dud)
- smacked.Name = "smacked"
- Debris:AddItem(smacked, 0.65)
- local Torso = dud:FindFirstChild("Torso") or dud:FindFirstChild("UpperTorso")
- local Humanoid = dud:FindFirstChildOfClass("Humanoid")
- if Torso then
- Fling(Torso, 15)
- end
- if Humanoid then
- Humanoid.Health = Humanoid.Health - 15
- if Value.Value > 500 then
- Humanoid.Sit = true
- end
- end
- coroutine.resume(coroutine.create(function()
- for i = 1,1000000000000000000000 do
- wait()
- if Humanoid.RootPart ~= nil and (Humanoid.RootPart.Position.X > 500 or Humanoid.RootPart.Position.X < -500) and not dud:FindFirstChild("owned") then
- smashed = true
- Value.Value = 1500
- dud:BreakJoints()
- Died(dud)
- local Attachment = Instance.new("Attachment",Humanoid.RootPart)
- Humanoid.RootPart.Rotation = Vector3.new(0,0,0)
- local ParticleEmitter = Instance.new("ParticleEmitter",Attachment)
- ParticleEmitter.Enabled = false
- ParticleEmitter.Texture = "rbxasset://textures/particles/fire_main.dds"
- ParticleEmitter.LightEmission = 0.8
- ParticleEmitter.Color = ColorSequence.new(Torso.Color)
- ParticleEmitter.Size = NumberSequence.new(15,0)
- ParticleEmitter.Transparency = NumberSequence.new(0,0.5)
- ParticleEmitter.Lifetime = NumberRange.new(1.5)
- ParticleEmitter.Rate = 500
- ParticleEmitter.Rotation = NumberRange.new(-360,360)
- ParticleEmitter.Speed = NumberRange.new(-500,500)
- ParticleEmitter.EmissionDirection = Enum.NormalId.Left
- ParticleEmitter:Emit(100)
- end
- end
- end))
- end
- end)
- for i = 1,18 do
- Swait()
- clerp(moonw, moonnor * CFrame.new(0 + 0.15 * Cos(sine / 36), 0 + 0.3 * Cos(sine / 18), 0), 0.2)
- clerp(RS, RSnor * CFrame.Angles(0, 0, Rad(180)), 0.2)
- clerp(LS, LSnor, 0.2)
- clerp(RH, RHnor, 0.2)
- clerp(LH, LHnor, 0.2)
- clerp(neck, necknor * CFrame.Angles(Rad(-15), 0, 0), 0.2)
- clerp(rootj, rootjnor, 0.2)
- end
- for i = 1,11 do
- Swait()
- clerp(moonw, moonnor * CFrame.new(0, 3, 3) * CFrame.Angles(Rad(90), 0, 0), 0.3)
- clerp(RS, RSnor * CFrame.Angles(0, 0, Rad(90)), 0.2)
- clerp(LS, LSnor, 0.2)
- clerp(RH, RHnor, 0.2)
- clerp(LH, LHnor, 0.2)
- clerp(neck, necknor * CFrame.Angles(Rad(15), 0, 0), 0.2)
- clerp(rootj, rootjnor, 0.2)
- end
- smasheffect(CFrame.new(moon.CFrame.x, moon.CFrame.y, moon.CFrame.z))
- touchy:Disconnect()
- Animate("In")
- attack = false
- end
- function sit()
- attack = true
- Animate("Out")
- for i = 1,150 do
- Swait()
- clerp(moonw, moonnor * CFrame.new(0 + 0.15 * Cos(sine / 36), 0 + 0.3 * Cos(sine / 18), 0), 0.2)
- clerp(RS, RSnor * CFrame.Angles(0, 0, Rad(-25)), 0.2)
- clerp(LS, LSnor * CFrame.Angles(0, 0, Rad(25)), 0.2)
- clerp(RH, RHnor * CFrame.Angles(Rad(-5), Rad(-10), Rad(75)), 0.2)
- clerp(LH, LHnor * CFrame.Angles(Rad(-5), Rad(10), Rad(-75)), 0.2)
- clerp(neck, necknor * CFrame.Angles(Rad(15), 0, 0), 0.2)
- clerp(rootj, rootjnor * CFrame.new(0, 0, 18.5) * CFrame.Angles(Rad(-15), 0, 0), 0.2)
- end
- Animate("In")
- attack = false
- end
- function wave()
- attack = true
- Animate("Out")
- for i = 1,150 do
- Swait()
- clerp(moonw, moonnor * CFrame.new(0 + 0.15 * Cos(sine / 36), 0 + 0.3 * Cos(sine / 18), 0), 0.2)
- clerp(RS, RSnor * CFrame.Angles(0, 0, 0), 0.2)
- clerp(LS, LSnor * CFrame.Angles(0, 0, 0), 0.2)
- clerp(RH, RHnor * CFrame.Angles(0, 0, 0), 0.2)
- clerp(LH, LHnor * CFrame.Angles(0, 0, 0), 0.2)
- clerp(neck, necknor * CFrame.Angles(0, 0, 0), 0.2)
- clerp(rootj, rootjnor * CFrame.new(0, 0, 0.25) * CFrame.Angles(Rad(-15), 0, 0), 0.2)
- end
- Animate("In")
- attack = false
- end
- function surf()
- if surfing then
- surfing = false
- root.Anchored = false
- else
- surfing = true
- end
- end
- spin = 0
- mouse.Button1Down:connect(function()
- if attack == false then
- slam()
- end
- end)
- mouse.KeyDown:connect(function(key)
- key=key:lower()
- if key == "t" and attack == false then
- sit()
- end
- if key == "u" and attack == false then
- surf()
- end
- end)
- while true do
- Swait()
- sine = sine + 1
- spin = spin + 1
- if surfing then
- root.Anchored = true
- char:TranslateBy(hum.MoveDirection)
- clerp(moonw, moonnor * CFrame.new(0, 3, 0) * CFrame.Angles(Rad(90), 0, 0), 0.3)
- clerp(RS, RSnor, 0.15)
- clerp(LS, LSnor, 0.15)
- clerp(RH, RHnor, 0.15)
- clerp(LH, LHnor, 0.15)
- clerp(neck, necknor, 0.15)
- clerp(rootj, rootjnor * CFrame.new(0, 0, 3), 0.15)
- end
- local TORSOVELOCITY = (root.Velocity * VT(1, 0, 1)).magnitude
- if TORSOVELOCITY < 1 then
- anim = "Idle"
- if math.random(1,60) == 1 then
- smasheffect(root.CFrame * CFrame.new(0, -2, 0) * CFrame.Angles(0, Rad(spin), 0))
- end
- if attack == false then
- clerp(moonw, moonnor * CFrame.new(0 + 0.15 * Cos(sine / 36), 0 + 0.3 * Cos(sine / 18), 0), 0.05)
- clerp(RS, RSnor, 0.15)
- clerp(LS, LSnor, 0.15)
- clerp(RH, RHnor, 0.15)
- clerp(LH, LHnor, 0.15)
- clerp(neck, necknor, 0.15)
- clerp(rootj, rootjnor, 0.15)
- end
- else
- anim = "Walk"
- if attack == false then
- clerp(moonw, moonnor * CFrame.new(0 + 0.15 * Cos(sine / 36), 0 + 0.3 * Cos(sine / 18), -5), 0.05)
- clerp(RS, RSnor, 0.15)
- clerp(LS, LSnor, 0.15)
- clerp(RH, RHnor, 0.15)
- clerp(LH, LHnor, 0.15)
- clerp(neck, necknor, 0.15)
- clerp(rootj, rootjnor, 0.15)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement