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,game,owner = owner,game
- local RealPlayer = Player
- do print("FE Compatibility code V3 by Desered_ROBLOX")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
- wait(0.3)
- Player = owner
- local AttackMode = false
- local MusicOn = false
- local CoolDownV = false
- local CoolDownC = false
- local CoolDownX = false
- local attacking = false
- mouse = Player:GetMouse()
- PlayerGui = Player.PlayerGui
- Cam = workspace.CurrentCamera
- Backpack = Player.Backpack
- Character = Player.Character
- Humanoid = Character.Humanoid
- RootPart = Character["HumanoidRootPart"]
- Torso = Character["Torso"]
- Head = Character["Head"]
- RightArm = Character["Right Arm"]
- LeftArm = Character["Left Arm"]
- RightLeg = Character["Right Leg"]
- LeftLeg = Character["Left Leg"]
- RootJoint = RootPart["RootJoint"]
- Neck = Torso["Neck"]
- RightShoulder = Torso["Right Shoulder"]
- LeftShoulder = Torso["Left Shoulder"]
- RightHip = Torso["Right Hip"]
- LeftHip = Torso["Left Hip"]
- local ANIMATOR = Humanoid.Animator
- local ANIMATE = Character.Animate
- ANIMATE:Destroy()
- char = Player.Character
- IT = Instance.new
- local ATTACK = IT("BoolValue",script)
- ATTACK.Name = "AttackC"
- ATTACK = false
- local ATTACK2 = IT("BoolValue",script)
- ATTACK2.Name = "AttackV"
- ATTACK2 = false
- CF = CFrame.new
- VT = Vector3.new
- RAD = math.rad
- C3 = Color3.new
- UD2 = UDim2.new
- BRICKC = BrickColor.new
- ANGLES = CFrame.Angles
- EULER = CFrame.fromEulerAnglesXYZ
- COS = math.cos
- ACOS = math.acos
- SIN = math.sin
- ASIN = math.asin
- ABS = math.abs
- MRANDOM = math.random
- FLOOR = math.floor
- Humanoid.WalkSpeed = 39
- local SINE = 0
- local WALK = 0
- local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
- local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
- Animation_Speed = 3
- local CHANGE = 2 / Animation_Speed
- local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
- local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
- local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
- local ROBLOXIDLEANIMATION = IT("Animation")
- ROBLOXIDLEANIMATION.Name = "IdleAnim"
- ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- ROBLOXIDLEANIMATION.Parent = Humanoid
- Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
- Player_Size = 1
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- frame = Frame_Speed
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function Swait(NUMBER)
- if NUMBER == 0 or NUMBER == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, NUMBER do
- ArtificialHB.Event:wait()
- end
- end
- end
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5 / s
- return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
- else
- local i = 0
- if m11 > m00 then
- i = 1
- end
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00 - m11 - m22 + 1)
- local recip = 0.5 / s
- return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
- elseif i == 1 then
- local s = math.sqrt(m11 - m22 - m00 + 1)
- local recip = 0.5 / s
- return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
- elseif i == 2 then
- local s = math.sqrt(m22 - m00 - m11 + 1)
- local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
- end
- end
- end
- function Clerp(a, b, t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1 - t
- return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w * xs, w * ys, w * zs
- local xx = x * xs
- local xy = x * ys
- local xz = x * zs
- local yy = y * ys
- local yz = y * zs
- local zz = z * zs
- return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
- end
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
- local startInterp, finishInterp;
- if cosTheta >= 0.0001 then
- if (1 - cosTheta) > 0.0001 then
- local theta = ACOS(cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((1 - t) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = 1 - t
- finishInterp = t
- end
- else
- if (1 + cosTheta) > 0.0001 then
- local theta = ACOS(-cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((t - 1) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = t - 1
- finishInterp = t
- end
- end
- return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
- end
- function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
- return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
- end
- --------------------------
- --REMOTE EVENT CREATION--
- --------------------------
- local ZAttack = IT("RemoteEvent",script)
- ZAttack.Name = "ZAttack"
- local XAttack = IT("RemoteEvent",script)
- XAttack.Name = "XAttack"
- local CAttack = IT("RemoteEvent",script)
- CAttack.Name = "CAttack"
- local VAttack = IT("RemoteEvent",script)
- VAttack.Name = "VAttack"
- local MAttack = IT("RemoteEvent",script)
- MAttack.Name = "MAttack"
- local NAttack = IT("RemoteEvent",script)
- NAttack.Name = "NAttack"
- --------------------------
- --ATTACK KEYBINDS--
- --------------------------
- function turnOn()
- if AttackMode == false then
- local owner = Character
- AttackMode = true
- else
- local owner = Character
- AttackMode = false
- end
- end
- function music()
- if MusicOn == false then
- MusicOn = true
- local owner = Character
- local Head = owner.Head
- local sound1 = Instance.new("Sound",Head)
- sound1.Name = "Theme"
- sound1.Volume = 0.5
- sound1.SoundId = "rbxassetid://511164015"
- sound1.PlaybackSpeed = 1
- sound1.TimePosition = 0
- sound1.Looped = true
- sound1.MaxDistance = 500
- sound1.EmitterSize = 10
- sound1.Playing = true
- elseif MusicOn == true then
- MusicOn = false
- local owner = Character
- local Head = owner.Head
- Head.Theme:Destroy()
- end
- end
- function blast()
- if CoolDownX == false and attacking == false and AttackMode == true then
- attacking = true
- CoolDownX = true
- ATTACK = true
- local main = Instance.new("Part",game.Workspace)
- main.Anchored = true
- main.Size = Vector3.new(1,1,1)
- main.CanCollide = false
- main.Transparency = 1
- main.CastShadow = false
- main.CFrame = RootPart.CFrame * CFrame.new(0,0,-5)
- main.CFrame = CFrame.new(main.Position,mouse.Hit.p)
- main.Name = "Main"
- local mparticle = Instance.new("ParticleEmitter",main)
- mparticle.LockedToPart = false
- mparticle.Drag = 1
- mparticle.Color = ColorSequence.new
- {
- ColorSequenceKeypoint.new(0,Color3.new(1,1,1));
- ColorSequenceKeypoint.new(0.5,Color3.new(0,0,0));
- ColorSequenceKeypoint.new(1,Color3.new(0,0,0));
- }
- mparticle.SpreadAngle = Vector2.new(360,360)
- mparticle.Speed = NumberRange.new(2.5,2.5)
- mparticle.Rotation = NumberRange.new(-180,180)
- mparticle.RotSpeed = NumberRange.new(-40,40)
- mparticle.Lifetime = NumberRange.new(1,2)
- mparticle.Name = "Core"
- mparticle.Transparency = NumberSequence.new
- {
- NumberSequenceKeypoint.new(0,1);
- NumberSequenceKeypoint.new(0.1,0);
- NumberSequenceKeypoint.new(1,1);
- }
- mparticle.Size = NumberSequence.new
- {
- NumberSequenceKeypoint.new(0,2);
- NumberSequenceKeypoint.new(1,1,1);
- }
- mparticle.Texture = "http://www.roblox.com/asset/?id=445231898"
- mparticle.LightEmission = 0
- mparticle.LightInfluence = 1
- mparticle.VelocityInheritance = 0
- mparticle.Enabled = true
- mparticle.Rate = 500
- local orb1 = Instance.new("Part",game.Workspace)
- orb1.Anchored = true
- orb1.Size = Vector3.new(1,1,1)
- orb1.CanCollide = false
- orb1.Transparency = 1
- orb1.CastShadow = false
- orb1.CFrame = main.CFrame * CFrame.new(-6,0,0)
- orb1.Name = "Orbit1"
- local o1particle = Instance.new("ParticleEmitter",orb1)
- o1particle.LockedToPart = false
- o1particle.Drag = 1
- o1particle.Color = ColorSequence.new
- {
- ColorSequenceKeypoint.new(0,Color3.new(1,1,1));
- ColorSequenceKeypoint.new(0.5,Color3.new(0,0,0));
- ColorSequenceKeypoint.new(1,Color3.new(0,0,0));
- }
- o1particle.SpreadAngle = Vector2.new(360,360)
- o1particle.Speed = NumberRange.new(1.5,1.5)
- o1particle.Rotation = NumberRange.new(-180,180)
- o1particle.RotSpeed = NumberRange.new(-40,40)
- o1particle.Lifetime = NumberRange.new(0.5,1)
- o1particle.Name = "Orb"
- o1particle.Transparency = NumberSequence.new
- {
- NumberSequenceKeypoint.new(0,1);
- NumberSequenceKeypoint.new(0.1,0);
- NumberSequenceKeypoint.new(1,1);
- }
- o1particle.Size = NumberSequence.new
- {
- NumberSequenceKeypoint.new(0,1);
- NumberSequenceKeypoint.new(1,0.5,0.5);
- }
- o1particle.Texture = "http://www.roblox.com/asset/?id=445231746"
- o1particle.LightEmission = 0
- o1particle.LightInfluence = 1
- o1particle.VelocityInheritance = 0
- o1particle.Enabled = true
- o1particle.Rate = 500
- local orb2 = Instance.new("Part",game.Workspace)
- orb2.Anchored = true
- orb2.Size = Vector3.new(1,1,1)
- orb2.CanCollide = false
- orb2.Transparency = 1
- orb2.CastShadow = false
- orb2.CFrame = main.CFrame * CFrame.new(6,0,0)
- orb2.Name = "Orbit2"
- local o2partilce = Instance.new("ParticleEmitter",orb2)
- o2partilce.LockedToPart = false
- o2partilce.Drag = 1
- o2partilce.Color = ColorSequence.new
- {
- ColorSequenceKeypoint.new(0,Color3.new(1,1,1));
- ColorSequenceKeypoint.new(0.5,Color3.new(0,0,0));
- ColorSequenceKeypoint.new(1,Color3.new(0,0,0));
- }
- o2partilce.SpreadAngle = Vector2.new(360,360)
- o2partilce.Speed = NumberRange.new(1.5,1.5)
- o2partilce.Rotation = NumberRange.new(-180,180)
- o2partilce.RotSpeed = NumberRange.new(-40,40)
- o2partilce.Lifetime = NumberRange.new(0.5,1)
- o2partilce.Name = "Orb"
- o2partilce.Transparency = NumberSequence.new
- {
- NumberSequenceKeypoint.new(0,1);
- NumberSequenceKeypoint.new(0.1,0);
- NumberSequenceKeypoint.new(1,1);
- }
- o2partilce.Size = NumberSequence.new
- {
- NumberSequenceKeypoint.new(0,1);
- NumberSequenceKeypoint.new(1,0.5,0.5);
- }
- o2partilce.Texture = "http://www.roblox.com/asset/?id=445231746"
- o2partilce.LightEmission = 0
- o2partilce.LightInfluence = 1
- o2partilce.VelocityInheritance = 0
- o2partilce.Enabled = true
- o2partilce.Rate = 500
- local BG = Instance.new("BodyGyro",RootPart)
- BG.D = 100
- BG.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
- BG.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p)
- local BP = Instance.new("BodyPosition",RootPart)
- BP.Position = RootPart.Position
- BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 1 + 0.5 * COS(SINE / 21)) * ANGLES(RAD(0), RAD(0), RAD(33)), 0.15 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(3 - 1 * SIN(SINE / 34)), RAD(0), RAD(-33)), 0.15 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.6, 0) * ANGLES(RAD(90), RAD(0), RAD(-33)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-3), RAD(2), RAD(-15)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.7) * ANGLES(RAD(-13), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- local castsound = Instance.new("Sound",RootPart)
- castsound.SoundId = "rbxassetid://414517770"
- castsound.Playing = true
- local exploded = false
- local BV = Instance.new("BodyVelocity",main)
- BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- BV.Velocity = main.CFrame.lookVector*35
- main.Anchored = false
- coroutine.resume(coroutine.create(function()
- while exploded == false do
- main.CFrame=main.CFrame*CFrame.fromEulerAnglesXYZ(0,0,0.1)
- orb1.CFrame = main.CFrame * CFrame.new(-6,0,0)
- orb2.CFrame = main.CFrame * CFrame.new(6,0,0)
- wait()
- end
- end))
- main.Touched:connect(function(Hit)
- if exploded == false then
- exploded = true
- BV:Destroy()
- orb1:Destroy()
- orb2:Destroy()
- local boom = Instance.new("Sound",main)
- boom.SoundId = "rbxassetid://402347142"
- boom.Volume = 2.5
- main.Anchored = true
- mparticle.Speed = NumberRange.new(99,99)
- mparticle.Size = NumberSequence.new
- {
- NumberSequenceKeypoint.new(0,10);
- NumberSequenceKeypoint.new(1,1,1);
- }
- mparticle.LockedToPart = true
- mparticle.Rate = 900
- boom.Playing = true
- --DAMAGE SCRIPT--
- local w = game.Workspace:GetChildren()
- for i = 1, # w do
- if w[i].ClassName == "Model" then
- local hu = w[i]:FindFirstChild("Humanoid")
- if hu ~= nil and hu.Parent.Name ~= char.Name and (main.Position - w[i].Head.Position).magnitude <= 19 then
- hu.Health = hu.Health - 50
- end
- end
- end
- ------------
- wait(0.75)
- mparticle.Enabled = false
- wait(5.25)
- main:Destroy()
- end
- end)
- wait(1.5)
- attacking = false
- ATTACK = false
- BG:Destroy()
- BP:Destroy()
- wait(4.5)
- CoolDownX = false
- wait(7)
- if exploded == false then
- main:Destroy()
- orb1:Destroy()
- orb2:Destroy()
- end
- end
- end
- --[[CAttack.OnServerEvent:connect(function(player)
- if CoolDownC == false and attacking == false and AttackMode == true then
- attacking = true
- CoolDownC = true
- local laserbrick = Instance.new("Part",game.Workspace)
- local chargebrick = Instance.new("Part",game.Workspace)
- local sound1 = Instance.new("Sound",Character["Left Arm"])
- sound1.Volume = 0.5
- sound1.SoundId = "rbxassetid://163619849"
- sound1.PlaybackSpeed = 1
- sound1.Looped = false
- sound1.MaxDistance = 500
- sound1.EmitterSize = 10
- sound1.Playing = true
- laserbrick.Transparency = 1
- laserbrick.Anchored = true
- laserbrick.CanCollide = false
- chargebrick.Transparency = 1
- chargebrick.Anchored = true
- chargebrick.CanCollide = false
- local sound2 = Instance.new("Sound",laserbrick)
- local distortion = Instance.new("DistortionSoundEffect",sound2)
- distortion.Level = 1
- sound2.Volume = 1
- sound2.PlaybackSpeed = 0.7
- sound2.Looped = false
- sound2.MaxDistance = 3333
- sound2.EmitterSize = 10
- sound2.SoundId = "rbxassetid://3273239976"
- laserbrick.Shape = Enum.PartType.Cylinder
- chargebrick.Shape = Enum.PartType.Ball
- laserbrick.Color = MainColor
- chargebrick.Color = MainColor
- laserbrick.Material = Enum.Material.Neon
- chargebrick.Material = Enum.Material.Neon
- laserbrick.Anchored = true
- laserbrick.CanCollide = false
- chargebrick.Anchored = true
- chargebrick.CanCollide = false
- chargebrick.Transparency = 0
- laserbrick.CFrame = Character.HumanoidRootPart.CFrame*CFrame.new(0,0,-9)
- chargebrick.CFrame = Character.HumanoidRootPart.CFrame*CFrame.new(0,0,-3)
- chargebrick.Orientation = chargebrick.Orientation + Vector3.new(0,90,0)
- for i = 1, 11 do
- chargebrick.Size = chargebrick.Size + Vector3.new(0.7,0.7,0.7)
- chargebrick.CFrame = chargebrick.CFrame*CFrame.new(0.35,0,0)
- wait()
- end
- laserbrick.Orientation = laserbrick.Orientation + Vector3.new(0,90,0)
- laserbrick.Transparency = 0
- sound1:Destroy()
- laserbrick.Touched:connect(function(Hit)
- local humanman = Hit.Parent:FindFirstChild("Humanoid")
- if humanman.Parent == Character then
- --ouch
- else
- humanman.Health = humanman.Health - 1
- end
- end)
- sound2.Playing = true
- for i = 1, 11 do
- laserbrick.Size = laserbrick.Size + Vector3.new(30,0.7,0.7)
- laserbrick.CFrame = laserbrick.CFrame*CFrame.new(15,0,0)
- wait()
- end
- for i = 1, 10 do
- laserbrick.Transparency = laserbrick.Transparency + 0.1
- chargebrick.Transparency = chargebrick.Transparency + 0.1
- sound2.Volume = sound2.Volume - 0.3/10
- wait()
- end
- laserbrick:Destroy()
- sound2:Destroy()
- attacking = false
- wait(1)
- CoolDownC = false
- end
- end)]]--
- --[[VAttack.OnServerEvent:connect(function(player)
- if CoolDownV == false and attacking == false and AttackMode == true then
- local dootbrick = Instance.new("Part",game.Workspace)
- local spinbrick = Instance.new("MeshPart",game.Workspace)
- local shockbrick = Instance.new("MeshPart",game.Workspace)
- local shockmesh = Instance.new("SpecialMesh",shockbrick)
- local dootmesh = Instance.new("SpecialMesh",dootbrick)
- local spinmesh = Instance.new("SpecialMesh",spinbrick)
- local owner = Character
- local sound1 = Instance.new("Sound",dootbrick)
- sound1.Volume = 10
- sound1.SoundId = "rbxassetid://2648563122"
- sound1.PlaybackSpeed = 0.3
- sound1.Looped = false
- sound1.MaxDistance = 5000
- sound1.EmitterSize = 10
- CoolDownV = true
- attacking = true
- shockmesh.MeshType = Enum.MeshType.FileMesh
- shockmesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
- shockbrick.Color = MainColor
- shockbrick.Transparency = 0.5
- shockbrick.Anchored = true
- shockbrick.CanCollide = false
- shockbrick.Material = Enum.Material.Neon
- shockbrick.Size = Vector3.new(1,1,1)
- spinmesh.MeshType = Enum.MeshType.FileMesh
- spinmesh.MeshId = "http://www.roblox.com/asset/?id=1051557"
- spinbrick.Color = MainColor
- spinbrick.Transparency = 0.5
- spinbrick.Anchored = true
- spinbrick.CanCollide = false
- spinbrick.Material = Enum.Material.Neon
- spinbrick.Size = Vector3.new(1,1,1)
- dootmesh.MeshType = Enum.MeshType.Sphere
- dootbrick.Color = MainColor
- dootbrick.Material = Enum.Material.Neon
- dootbrick.Size = Vector3.new(1,1,1)
- dootbrick.Anchored = true
- dootbrick.CanCollide = false
- dootbrick.Position = owner.HumanoidRootPart.Position
- spinbrick.Position = owner.HumanoidRootPart.Position
- shockbrick.Position = owner.HumanoidRootPart.Position
- owner.Humanoid.WalkSpeed = 0
- owner.Humanoid.JumpPower = 0
- sound1.Playing = true
- dootbrick.Touched:connect(function(Hit)
- local humanman = Hit.Parent:FindFirstChild("Humanoid")
- if humanman.Parent == owner then
- --ouch
- else
- humanman.Health = humanman.Health - 1
- end
- end)
- for i = 1, 79 do
- dootbrick.Size = dootbrick.Size +Vector3.new(3,33,3)
- spinbrick.CFrame = spinbrick.CFrame * CFrame.fromEulerAnglesXYZ(0, 0.5, 0)
- spinmesh.Scale = spinmesh.Scale +Vector3.new(3.3,33,3.1)
- spinbrick.Size = spinbrick.Size +Vector3.new(3.3,33,3.1)
- shockbrick.CFrame = shockbrick.CFrame * CFrame.fromEulerAnglesXYZ(0, -0.05, 0)
- shockmesh.Scale = shockmesh.Scale +Vector3.new(7,0.5,7)
- shockbrick.Size = shockbrick.Size +Vector3.new(7,0.5,7)
- wait()
- end
- for i = 1, 10 do
- dootbrick.Transparency = dootbrick.Transparency + 0.1
- spinbrick.Transparency = spinbrick.Transparency + 0.1
- shockbrick.Transparency = shockbrick.Transparency + 0.1
- sound1.Volume = sound1.Volume - 1
- wait()
- end
- dootbrick:Destroy()
- spinbrick:Destroy()
- shockbrick:Destroy()
- sound1:Destroy()
- owner.Humanoid.WalkSpeed = 25
- owner.Humanoid.JumpPower = 50
- attacking = false
- wait(7)
- CoolDownV = false
- end
- end)]]--
- function blink()
- coroutine.resume(coroutine.create(function()
- if attacking == false then
- local ting = Instance.new("Part", workspace)
- local human = Character.Humanoid
- ting.CanCollide = false
- ting.Material = Enum.Material.Neon
- ting.Anchored = true
- ting.Color = Color3.new(1,1,1)
- ting.Size = Vector3.new(0, 0, 0)
- ting.Transparency = 1
- ting.CFrame = Player.Character.HumanoidRootPart.CFrame
- local tingy = Instance.new("ParticleEmitter",ting)
- tingy.LockedToPart = false
- tingy.Drag = 1
- tingy.Color = ColorSequence.new
- {
- ColorSequenceKeypoint.new(0,Color3.new(1,1,1));
- ColorSequenceKeypoint.new(0.5,Color3.new(0,0,0));
- ColorSequenceKeypoint.new(1,Color3.new(0,0,0));
- }
- tingy.SpreadAngle = Vector2.new(360,360)
- tingy.Speed = NumberRange.new(4.5,4.5)
- tingy.Rotation = NumberRange.new(-180,180)
- tingy.RotSpeed = NumberRange.new(-40,40)
- tingy.Lifetime = NumberRange.new(1,2)
- tingy.Name = "Core"
- tingy.Transparency = NumberSequence.new
- {
- NumberSequenceKeypoint.new(0,1);
- NumberSequenceKeypoint.new(0.1,0);
- NumberSequenceKeypoint.new(1,1);
- }
- tingy.Size = NumberSequence.new
- {
- NumberSequenceKeypoint.new(0,5);
- NumberSequenceKeypoint.new(1,2.5,2.5);
- }
- tingy.Texture = "http://www.roblox.com/asset/?id=445231898"
- tingy.LightEmission = 0
- tingy.LightInfluence = 1
- tingy.VelocityInheritance = 0
- tingy.ZOffset = 1
- tingy.Rate = 500
- local soundid1="rbxassetid://218410588"
- local soundid2="rbxassetid://416001005"
- local soundid3="rbxassetid://418168618"
- local s=Instance.new("Sound",ting)
- s.Name="BlinkSound1"
- s.SoundId=soundid1
- local s2=Instance.new("Sound",ting)
- s2.Name="BlinkSound2"
- s2.SoundId=soundid2
- local s3=Instance.new("Sound",ting)
- s3.Name="BlinkSound3"
- s3.SoundId=soundid3
- tingy.Enabled = true
- ting["BlinkSound" .. tostring(math.random(1,3))]:Play()
- wait(0.35)
- tingy.Enabled = false
- wait(3)
- ting:Destroy()
- end
- end))
- end
- ------------
- --KEYBINDS--
- ------------
- mouse.KeyDown:connect(function(key)
- if key == "z" then
- turnOn()
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "x" then
- blast()
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "c" then
- --nothing for now
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "v" then
- --nothing for now
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "m" then
- music()
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "n" then
- blink()
- local MyBody = Player.Character
- local hit = mouse.Hit
- MyBody:MoveTo(hit.p)
- end
- end)
- --------------------------
- --ANIMATIONS--
- --------------------------
- local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
- IDLEANIMATION:Play()
- while true do
- Swait()
- --------------------------
- --DEFAULT ANIM--
- --------------------------
- ANIMATE.Parent = nil
- SINE = SINE + CHANGE
- local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
- local TORSOVERTICALVELOCITY = RootPart.Velocity.y
- local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
- local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
- local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
- if ANIM == "Walk" and Humanoid.MoveDirection ~= Vector3.new(0,0,0) then
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 1 + 0.5 * COS(SINE / 21)) * ANGLES(RAD(57), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.7) * ANGLES(RAD(-13), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- elseif (ANIM ~= "Walk") or (Humanoid.MoveDirection == Vector3.new(0,0,0)) then
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 1 + 0.5 * COS(SINE / 21)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(9 - 7 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.7) * ANGLES(RAD(-13), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- end
- if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
- ANIM = "Jump"
- if ATTACK == false then
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 * Player_Size, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
- end
- elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
- ANIM = "Idle"
- if ATTACK == false then
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 1 + 0.5 * COS(SINE / 21)) * ANGLES(RAD(0), RAD(0), RAD(33)), 0.15 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(3 - 1 * SIN(SINE / 34)), RAD(0), RAD(-33)), 0.15 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.6, 0) * ANGLES(RAD(11), RAD(-3), RAD(15)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-3), RAD(2), RAD(-15)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.7) * ANGLES(RAD(-13), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- end
- elseif Humanoid.MoveDirection ~= Vector3.new(0,0,0) and HITFLOOR ~= nil then
- ANIM = "Walk"
- WALK = WALK + 1 / Animation_Speed
- if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then
- WALK = 0
- if WALKINGANIM == true then
- WALKINGANIM = false
- elseif WALKINGANIM == false then
- WALKINGANIM = true
- end
- end
- --RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
- --LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
- if ATTACK == false then
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 1 + 0.5 * COS(SINE / 21)) * ANGLES(RAD(57), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.6, 0) * ANGLES(RAD(-23), RAD(-11), RAD(15)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-23), RAD(11), RAD(-15)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.7) * ANGLES(RAD(-13), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement