Advertisement
Sheckles

oof

Oct 25th, 2018
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.49 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2.  
  3. local Player,game,owner = owner,game
  4.  
  5. local RealPlayer = Player
  6.  
  7. 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
  8.  
  9. wait(0.3)
  10.  
  11. Player = owner
  12. local AttackMode = false
  13. local MusicOn = false
  14. local CoolDownV = false
  15. local CoolDownC = false
  16. local CoolDownX = false
  17. local attacking = false
  18. mouse = Player:GetMouse()
  19. PlayerGui = Player.PlayerGui
  20. Cam = workspace.CurrentCamera
  21. Backpack = Player.Backpack
  22. Character = Player.Character
  23. Humanoid = Character.Humanoid
  24. RootPart = Character["HumanoidRootPart"]
  25. Torso = Character["Torso"]
  26. Head = Character["Head"]
  27. RightArm = Character["Right Arm"]
  28. LeftArm = Character["Left Arm"]
  29. RightLeg = Character["Right Leg"]
  30. LeftLeg = Character["Left Leg"]
  31. RootJoint = RootPart["RootJoint"]
  32. Neck = Torso["Neck"]
  33. RightShoulder = Torso["Right Shoulder"]
  34. LeftShoulder = Torso["Left Shoulder"]
  35. RightHip = Torso["Right Hip"]
  36. LeftHip = Torso["Left Hip"]
  37. local ANIMATOR = Humanoid.Animator
  38. local ANIMATE = Character.Animate
  39. ANIMATE:Destroy()
  40. char = Player.Character
  41. IT = Instance.new
  42. local ATTACK = IT("BoolValue",script)
  43. ATTACK.Name = "AttackC"
  44. ATTACK = false
  45. local ATTACK2 = IT("BoolValue",script)
  46. ATTACK2.Name = "AttackV"
  47. ATTACK2 = false
  48. CF = CFrame.new
  49. VT = Vector3.new
  50. RAD = math.rad
  51. C3 = Color3.new
  52. UD2 = UDim2.new
  53. BRICKC = BrickColor.new
  54. ANGLES = CFrame.Angles
  55. EULER = CFrame.fromEulerAnglesXYZ
  56. COS = math.cos
  57. ACOS = math.acos
  58. SIN = math.sin
  59. ASIN = math.asin
  60. ABS = math.abs
  61. MRANDOM = math.random
  62. FLOOR = math.floor
  63. Humanoid.WalkSpeed = 39
  64. local SINE = 0
  65. local WALK = 0
  66. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  67. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  68. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  69. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  70. Animation_Speed = 3
  71. local CHANGE = 2 / Animation_Speed
  72. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  73. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  74. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  75. local ROBLOXIDLEANIMATION = IT("Animation")
  76. ROBLOXIDLEANIMATION.Name = "IdleAnim"
  77. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  78. ROBLOXIDLEANIMATION.Parent = Humanoid
  79. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  80. Player_Size = 1
  81. ArtificialHB = Instance.new("BindableEvent", script)
  82. ArtificialHB.Name = "ArtificialHB"
  83.  
  84. script:WaitForChild("ArtificialHB")
  85.  
  86. frame = Frame_Speed
  87. tf = 0
  88. allowframeloss = false
  89. tossremainder = false
  90. lastframe = tick()
  91. script.ArtificialHB:Fire()
  92.  
  93. game:GetService("RunService").Heartbeat:connect(function(s, p)
  94. tf = tf + s
  95. if tf >= frame then
  96. if allowframeloss then
  97. script.ArtificialHB:Fire()
  98. lastframe = tick()
  99. else
  100. for i = 1, math.floor(tf / frame) do
  101. script.ArtificialHB:Fire()
  102. end
  103. lastframe = tick()
  104. end
  105. if tossremainder then
  106. tf = 0
  107. else
  108. tf = tf - frame * math.floor(tf / frame)
  109. end
  110. end
  111. end)
  112.  
  113. function Swait(NUMBER)
  114. if NUMBER == 0 or NUMBER == nil then
  115. ArtificialHB.Event:wait()
  116. else
  117. for i = 1, NUMBER do
  118. ArtificialHB.Event:wait()
  119. end
  120. end
  121. end
  122.  
  123. function QuaternionFromCFrame(cf)
  124. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  125. local trace = m00 + m11 + m22
  126. if trace > 0 then
  127. local s = math.sqrt(1 + trace)
  128. local recip = 0.5 / s
  129. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  130. else
  131. local i = 0
  132. if m11 > m00 then
  133. i = 1
  134. end
  135. if m22 > (i == 0 and m00 or m11) then
  136. i = 2
  137. end
  138. if i == 0 then
  139. local s = math.sqrt(m00 - m11 - m22 + 1)
  140. local recip = 0.5 / s
  141. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  142. elseif i == 1 then
  143. local s = math.sqrt(m11 - m22 - m00 + 1)
  144. local recip = 0.5 / s
  145. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  146. elseif i == 2 then
  147. local s = math.sqrt(m22 - m00 - m11 + 1)
  148. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  149. end
  150. end
  151. end
  152.  
  153. function Clerp(a, b, t)
  154. local qa = {QuaternionFromCFrame(a)}
  155. local qb = {QuaternionFromCFrame(b)}
  156. local ax, ay, az = a.x, a.y, a.z
  157. local bx, by, bz = b.x, b.y, b.z
  158. local _t = 1 - t
  159. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  160. end
  161.  
  162. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  163. local xs, ys, zs = x + x, y + y, z + z
  164. local wx, wy, wz = w * xs, w * ys, w * zs
  165. local xx = x * xs
  166. local xy = x * ys
  167. local xz = x * zs
  168. local yy = y * ys
  169. local yz = y * zs
  170. local zz = z * zs
  171. 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))
  172. end
  173.  
  174. function QuaternionSlerp(a, b, t)
  175. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  176. local startInterp, finishInterp;
  177. if cosTheta >= 0.0001 then
  178. if (1 - cosTheta) > 0.0001 then
  179. local theta = ACOS(cosTheta)
  180. local invSinTheta = 1 / SIN(theta)
  181. startInterp = SIN((1 - t) * theta) * invSinTheta
  182. finishInterp = SIN(t * theta) * invSinTheta
  183. else
  184. startInterp = 1 - t
  185. finishInterp = t
  186. end
  187. else
  188. if (1 + cosTheta) > 0.0001 then
  189. local theta = ACOS(-cosTheta)
  190. local invSinTheta = 1 / SIN(theta)
  191. startInterp = SIN((t - 1) * theta) * invSinTheta
  192. finishInterp = SIN(t * theta) * invSinTheta
  193. else
  194. startInterp = t - 1
  195. finishInterp = t
  196. end
  197. end
  198. 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
  199. end
  200.  
  201. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  202. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  203. end
  204.  
  205. --------------------------
  206. --REMOTE EVENT CREATION--
  207. --------------------------
  208. local ZAttack = IT("RemoteEvent",script)
  209. ZAttack.Name = "ZAttack"
  210.  
  211. local XAttack = IT("RemoteEvent",script)
  212. XAttack.Name = "XAttack"
  213.  
  214. local CAttack = IT("RemoteEvent",script)
  215. CAttack.Name = "CAttack"
  216.  
  217. local VAttack = IT("RemoteEvent",script)
  218. VAttack.Name = "VAttack"
  219.  
  220. local MAttack = IT("RemoteEvent",script)
  221. MAttack.Name = "MAttack"
  222.  
  223. local NAttack = IT("RemoteEvent",script)
  224. NAttack.Name = "NAttack"
  225.  
  226. --------------------------
  227. --ATTACK KEYBINDS--
  228. --------------------------
  229. function turnOn()
  230. if AttackMode == false then
  231. local owner = Character
  232. AttackMode = true
  233. else
  234. local owner = Character
  235. AttackMode = false
  236. end
  237. end
  238.  
  239. function music()
  240. if MusicOn == false then
  241. MusicOn = true
  242. local owner = Character
  243. local Head = owner.Head
  244. local sound1 = Instance.new("Sound",Head)
  245. sound1.Name = "Theme"
  246. sound1.Volume = 0.5
  247. sound1.SoundId = "rbxassetid://511164015"
  248. sound1.PlaybackSpeed = 1
  249. sound1.TimePosition = 0
  250. sound1.Looped = true
  251. sound1.MaxDistance = 500
  252. sound1.EmitterSize = 10
  253. sound1.Playing = true
  254. elseif MusicOn == true then
  255. MusicOn = false
  256. local owner = Character
  257. local Head = owner.Head
  258. Head.Theme:Destroy()
  259. end
  260. end
  261.  
  262. function blast()
  263. if CoolDownX == false and attacking == false and AttackMode == true then
  264. attacking = true
  265. CoolDownX = true
  266. ATTACK = true
  267. local main = Instance.new("Part",game.Workspace)
  268. main.Anchored = true
  269. main.Size = Vector3.new(1,1,1)
  270. main.CanCollide = false
  271. main.Transparency = 1
  272. main.CastShadow = false
  273. main.CFrame = RootPart.CFrame * CFrame.new(0,0,-5)
  274. main.CFrame = CFrame.new(main.Position,mouse.Hit.p)
  275. main.Name = "Main"
  276. local mparticle = Instance.new("ParticleEmitter",main)
  277. mparticle.LockedToPart = false
  278. mparticle.Drag = 1
  279. mparticle.Color = ColorSequence.new
  280. {
  281. ColorSequenceKeypoint.new(0,Color3.new(1,1,1));
  282. ColorSequenceKeypoint.new(0.5,Color3.new(0,0,0));
  283. ColorSequenceKeypoint.new(1,Color3.new(0,0,0));
  284. }
  285. mparticle.SpreadAngle = Vector2.new(360,360)
  286. mparticle.Speed = NumberRange.new(2.5,2.5)
  287. mparticle.Rotation = NumberRange.new(-180,180)
  288. mparticle.RotSpeed = NumberRange.new(-40,40)
  289. mparticle.Lifetime = NumberRange.new(1,2)
  290. mparticle.Name = "Core"
  291. mparticle.Transparency = NumberSequence.new
  292. {
  293. NumberSequenceKeypoint.new(0,1);
  294. NumberSequenceKeypoint.new(0.1,0);
  295. NumberSequenceKeypoint.new(1,1);
  296. }
  297. mparticle.Size = NumberSequence.new
  298. {
  299. NumberSequenceKeypoint.new(0,2);
  300. NumberSequenceKeypoint.new(1,1,1);
  301. }
  302. mparticle.Texture = "http://www.roblox.com/asset/?id=445231898"
  303. mparticle.LightEmission = 0
  304. mparticle.LightInfluence = 1
  305. mparticle.VelocityInheritance = 0
  306. mparticle.Enabled = true
  307. mparticle.Rate = 500
  308.  
  309. local orb1 = Instance.new("Part",game.Workspace)
  310. orb1.Anchored = true
  311. orb1.Size = Vector3.new(1,1,1)
  312. orb1.CanCollide = false
  313. orb1.Transparency = 1
  314. orb1.CastShadow = false
  315. orb1.CFrame = main.CFrame * CFrame.new(-6,0,0)
  316. orb1.Name = "Orbit1"
  317. local o1particle = Instance.new("ParticleEmitter",orb1)
  318. o1particle.LockedToPart = false
  319. o1particle.Drag = 1
  320. o1particle.Color = ColorSequence.new
  321. {
  322. ColorSequenceKeypoint.new(0,Color3.new(1,1,1));
  323. ColorSequenceKeypoint.new(0.5,Color3.new(0,0,0));
  324. ColorSequenceKeypoint.new(1,Color3.new(0,0,0));
  325. }
  326. o1particle.SpreadAngle = Vector2.new(360,360)
  327. o1particle.Speed = NumberRange.new(1.5,1.5)
  328. o1particle.Rotation = NumberRange.new(-180,180)
  329. o1particle.RotSpeed = NumberRange.new(-40,40)
  330. o1particle.Lifetime = NumberRange.new(0.5,1)
  331. o1particle.Name = "Orb"
  332. o1particle.Transparency = NumberSequence.new
  333. {
  334. NumberSequenceKeypoint.new(0,1);
  335. NumberSequenceKeypoint.new(0.1,0);
  336. NumberSequenceKeypoint.new(1,1);
  337. }
  338. o1particle.Size = NumberSequence.new
  339. {
  340. NumberSequenceKeypoint.new(0,1);
  341. NumberSequenceKeypoint.new(1,0.5,0.5);
  342. }
  343. o1particle.Texture = "http://www.roblox.com/asset/?id=445231746"
  344. o1particle.LightEmission = 0
  345. o1particle.LightInfluence = 1
  346. o1particle.VelocityInheritance = 0
  347. o1particle.Enabled = true
  348. o1particle.Rate = 500
  349.  
  350. local orb2 = Instance.new("Part",game.Workspace)
  351. orb2.Anchored = true
  352. orb2.Size = Vector3.new(1,1,1)
  353. orb2.CanCollide = false
  354. orb2.Transparency = 1
  355. orb2.CastShadow = false
  356. orb2.CFrame = main.CFrame * CFrame.new(6,0,0)
  357. orb2.Name = "Orbit2"
  358. local o2partilce = Instance.new("ParticleEmitter",orb2)
  359. o2partilce.LockedToPart = false
  360. o2partilce.Drag = 1
  361. o2partilce.Color = ColorSequence.new
  362. {
  363. ColorSequenceKeypoint.new(0,Color3.new(1,1,1));
  364. ColorSequenceKeypoint.new(0.5,Color3.new(0,0,0));
  365. ColorSequenceKeypoint.new(1,Color3.new(0,0,0));
  366. }
  367. o2partilce.SpreadAngle = Vector2.new(360,360)
  368. o2partilce.Speed = NumberRange.new(1.5,1.5)
  369. o2partilce.Rotation = NumberRange.new(-180,180)
  370. o2partilce.RotSpeed = NumberRange.new(-40,40)
  371. o2partilce.Lifetime = NumberRange.new(0.5,1)
  372. o2partilce.Name = "Orb"
  373. o2partilce.Transparency = NumberSequence.new
  374. {
  375. NumberSequenceKeypoint.new(0,1);
  376. NumberSequenceKeypoint.new(0.1,0);
  377. NumberSequenceKeypoint.new(1,1);
  378. }
  379. o2partilce.Size = NumberSequence.new
  380. {
  381. NumberSequenceKeypoint.new(0,1);
  382. NumberSequenceKeypoint.new(1,0.5,0.5);
  383. }
  384. o2partilce.Texture = "http://www.roblox.com/asset/?id=445231746"
  385. o2partilce.LightEmission = 0
  386. o2partilce.LightInfluence = 1
  387. o2partilce.VelocityInheritance = 0
  388. o2partilce.Enabled = true
  389. o2partilce.Rate = 500
  390.  
  391. local BG = Instance.new("BodyGyro",RootPart)
  392. BG.D = 100
  393. BG.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
  394. BG.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p)
  395. local BP = Instance.new("BodyPosition",RootPart)
  396. BP.Position = RootPart.Position
  397. BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  398.  
  399. 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)
  400. 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)
  401. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.6, 0) * ANGLES(RAD(90), RAD(0), RAD(-33)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  402. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-3), RAD(2), RAD(-15)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  403. 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)
  404. 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)
  405.  
  406. local castsound = Instance.new("Sound",RootPart)
  407. castsound.SoundId = "rbxassetid://414517770"
  408. castsound.Playing = true
  409. local exploded = false
  410. local BV = Instance.new("BodyVelocity",main)
  411. BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  412. BV.Velocity = main.CFrame.lookVector*35
  413. main.Anchored = false
  414. coroutine.resume(coroutine.create(function()
  415. while exploded == false do
  416. main.CFrame=main.CFrame*CFrame.fromEulerAnglesXYZ(0,0,0.1)
  417. orb1.CFrame = main.CFrame * CFrame.new(-6,0,0)
  418. orb2.CFrame = main.CFrame * CFrame.new(6,0,0)
  419. wait()
  420. end
  421. end))
  422. main.Touched:connect(function(Hit)
  423. if exploded == false then
  424. exploded = true
  425. BV:Destroy()
  426. orb1:Destroy()
  427. orb2:Destroy()
  428. local boom = Instance.new("Sound",main)
  429. boom.SoundId = "rbxassetid://402347142"
  430. boom.Volume = 2.5
  431. main.Anchored = true
  432. mparticle.Speed = NumberRange.new(99,99)
  433. mparticle.Size = NumberSequence.new
  434. {
  435. NumberSequenceKeypoint.new(0,10);
  436. NumberSequenceKeypoint.new(1,1,1);
  437. }
  438. mparticle.LockedToPart = true
  439. mparticle.Rate = 900
  440. boom.Playing = true
  441. --DAMAGE SCRIPT--
  442. local w = game.Workspace:GetChildren()
  443. for i = 1, # w do
  444. if w[i].ClassName == "Model" then
  445. local hu = w[i]:FindFirstChild("Humanoid")
  446. if hu ~= nil and hu.Parent.Name ~= char.Name and (main.Position - w[i].Head.Position).magnitude <= 19 then
  447. hu.Health = hu.Health - 50
  448. end
  449. end
  450. end
  451. ------------
  452. wait(0.75)
  453. mparticle.Enabled = false
  454. wait(5.25)
  455. main:Destroy()
  456. end
  457. end)
  458. wait(1.5)
  459. attacking = false
  460. ATTACK = false
  461. BG:Destroy()
  462. BP:Destroy()
  463. wait(4.5)
  464. CoolDownX = false
  465. wait(7)
  466. if exploded == false then
  467. main:Destroy()
  468. orb1:Destroy()
  469. orb2:Destroy()
  470. end
  471.  
  472. end
  473. end
  474.  
  475. --[[CAttack.OnServerEvent:connect(function(player)
  476. if CoolDownC == false and attacking == false and AttackMode == true then
  477. attacking = true
  478. CoolDownC = true
  479. local laserbrick = Instance.new("Part",game.Workspace)
  480. local chargebrick = Instance.new("Part",game.Workspace)
  481. local sound1 = Instance.new("Sound",Character["Left Arm"])
  482. sound1.Volume = 0.5
  483. sound1.SoundId = "rbxassetid://163619849"
  484. sound1.PlaybackSpeed = 1
  485. sound1.Looped = false
  486. sound1.MaxDistance = 500
  487. sound1.EmitterSize = 10
  488. sound1.Playing = true
  489. laserbrick.Transparency = 1
  490. laserbrick.Anchored = true
  491. laserbrick.CanCollide = false
  492. chargebrick.Transparency = 1
  493. chargebrick.Anchored = true
  494. chargebrick.CanCollide = false
  495. local sound2 = Instance.new("Sound",laserbrick)
  496. local distortion = Instance.new("DistortionSoundEffect",sound2)
  497. distortion.Level = 1
  498. sound2.Volume = 1
  499. sound2.PlaybackSpeed = 0.7
  500. sound2.Looped = false
  501. sound2.MaxDistance = 3333
  502. sound2.EmitterSize = 10
  503. sound2.SoundId = "rbxassetid://3273239976"
  504. laserbrick.Shape = Enum.PartType.Cylinder
  505. chargebrick.Shape = Enum.PartType.Ball
  506. laserbrick.Color = MainColor
  507. chargebrick.Color = MainColor
  508. laserbrick.Material = Enum.Material.Neon
  509. chargebrick.Material = Enum.Material.Neon
  510. laserbrick.Anchored = true
  511. laserbrick.CanCollide = false
  512. chargebrick.Anchored = true
  513. chargebrick.CanCollide = false
  514. chargebrick.Transparency = 0
  515. laserbrick.CFrame = Character.HumanoidRootPart.CFrame*CFrame.new(0,0,-9)
  516. chargebrick.CFrame = Character.HumanoidRootPart.CFrame*CFrame.new(0,0,-3)
  517. chargebrick.Orientation = chargebrick.Orientation + Vector3.new(0,90,0)
  518. for i = 1, 11 do
  519. chargebrick.Size = chargebrick.Size + Vector3.new(0.7,0.7,0.7)
  520. chargebrick.CFrame = chargebrick.CFrame*CFrame.new(0.35,0,0)
  521. wait()
  522. end
  523. laserbrick.Orientation = laserbrick.Orientation + Vector3.new(0,90,0)
  524. laserbrick.Transparency = 0
  525. sound1:Destroy()
  526. laserbrick.Touched:connect(function(Hit)
  527. local humanman = Hit.Parent:FindFirstChild("Humanoid")
  528. if humanman.Parent == Character then
  529. --ouch
  530. else
  531. humanman.Health = humanman.Health - 1
  532. end
  533.  
  534. end)
  535. sound2.Playing = true
  536. for i = 1, 11 do
  537. laserbrick.Size = laserbrick.Size + Vector3.new(30,0.7,0.7)
  538. laserbrick.CFrame = laserbrick.CFrame*CFrame.new(15,0,0)
  539. wait()
  540. end
  541. for i = 1, 10 do
  542. laserbrick.Transparency = laserbrick.Transparency + 0.1
  543. chargebrick.Transparency = chargebrick.Transparency + 0.1
  544. sound2.Volume = sound2.Volume - 0.3/10
  545. wait()
  546. end
  547. laserbrick:Destroy()
  548. sound2:Destroy()
  549. attacking = false
  550. wait(1)
  551. CoolDownC = false
  552. end
  553. end)]]--
  554.  
  555. --[[VAttack.OnServerEvent:connect(function(player)
  556. if CoolDownV == false and attacking == false and AttackMode == true then
  557. local dootbrick = Instance.new("Part",game.Workspace)
  558. local spinbrick = Instance.new("MeshPart",game.Workspace)
  559. local shockbrick = Instance.new("MeshPart",game.Workspace)
  560. local shockmesh = Instance.new("SpecialMesh",shockbrick)
  561. local dootmesh = Instance.new("SpecialMesh",dootbrick)
  562. local spinmesh = Instance.new("SpecialMesh",spinbrick)
  563. local owner = Character
  564. local sound1 = Instance.new("Sound",dootbrick)
  565. sound1.Volume = 10
  566. sound1.SoundId = "rbxassetid://2648563122"
  567. sound1.PlaybackSpeed = 0.3
  568. sound1.Looped = false
  569. sound1.MaxDistance = 5000
  570. sound1.EmitterSize = 10
  571. CoolDownV = true
  572. attacking = true
  573. shockmesh.MeshType = Enum.MeshType.FileMesh
  574. shockmesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  575. shockbrick.Color = MainColor
  576. shockbrick.Transparency = 0.5
  577. shockbrick.Anchored = true
  578. shockbrick.CanCollide = false
  579. shockbrick.Material = Enum.Material.Neon
  580. shockbrick.Size = Vector3.new(1,1,1)
  581. spinmesh.MeshType = Enum.MeshType.FileMesh
  582. spinmesh.MeshId = "http://www.roblox.com/asset/?id=1051557"
  583. spinbrick.Color = MainColor
  584. spinbrick.Transparency = 0.5
  585. spinbrick.Anchored = true
  586. spinbrick.CanCollide = false
  587. spinbrick.Material = Enum.Material.Neon
  588. spinbrick.Size = Vector3.new(1,1,1)
  589. dootmesh.MeshType = Enum.MeshType.Sphere
  590. dootbrick.Color = MainColor
  591. dootbrick.Material = Enum.Material.Neon
  592. dootbrick.Size = Vector3.new(1,1,1)
  593. dootbrick.Anchored = true
  594. dootbrick.CanCollide = false
  595. dootbrick.Position = owner.HumanoidRootPart.Position
  596. spinbrick.Position = owner.HumanoidRootPart.Position
  597. shockbrick.Position = owner.HumanoidRootPart.Position
  598. owner.Humanoid.WalkSpeed = 0
  599. owner.Humanoid.JumpPower = 0
  600. sound1.Playing = true
  601. dootbrick.Touched:connect(function(Hit)
  602. local humanman = Hit.Parent:FindFirstChild("Humanoid")
  603. if humanman.Parent == owner then
  604. --ouch
  605. else
  606. humanman.Health = humanman.Health - 1
  607. end
  608.  
  609. end)
  610.  
  611. for i = 1, 79 do
  612. dootbrick.Size = dootbrick.Size +Vector3.new(3,33,3)
  613. spinbrick.CFrame = spinbrick.CFrame * CFrame.fromEulerAnglesXYZ(0, 0.5, 0)
  614. spinmesh.Scale = spinmesh.Scale +Vector3.new(3.3,33,3.1)
  615. spinbrick.Size = spinbrick.Size +Vector3.new(3.3,33,3.1)
  616. shockbrick.CFrame = shockbrick.CFrame * CFrame.fromEulerAnglesXYZ(0, -0.05, 0)
  617. shockmesh.Scale = shockmesh.Scale +Vector3.new(7,0.5,7)
  618. shockbrick.Size = shockbrick.Size +Vector3.new(7,0.5,7)
  619. wait()
  620. end
  621. for i = 1, 10 do
  622. dootbrick.Transparency = dootbrick.Transparency + 0.1
  623. spinbrick.Transparency = spinbrick.Transparency + 0.1
  624. shockbrick.Transparency = shockbrick.Transparency + 0.1
  625. sound1.Volume = sound1.Volume - 1
  626. wait()
  627. end
  628. dootbrick:Destroy()
  629. spinbrick:Destroy()
  630. shockbrick:Destroy()
  631. sound1:Destroy()
  632. owner.Humanoid.WalkSpeed = 25
  633. owner.Humanoid.JumpPower = 50
  634. attacking = false
  635. wait(7)
  636. CoolDownV = false
  637. end
  638. end)]]--
  639.  
  640. function blink()
  641. coroutine.resume(coroutine.create(function()
  642. if attacking == false then
  643. local ting = Instance.new("Part", workspace)
  644. local human = Character.Humanoid
  645. ting.CanCollide = false
  646. ting.Material = Enum.Material.Neon
  647. ting.Anchored = true
  648. ting.Color = Color3.new(1,1,1)
  649. ting.Size = Vector3.new(0, 0, 0)
  650. ting.Transparency = 1
  651. ting.CFrame = Player.Character.HumanoidRootPart.CFrame
  652. local tingy = Instance.new("ParticleEmitter",ting)
  653. tingy.LockedToPart = false
  654. tingy.Drag = 1
  655. tingy.Color = ColorSequence.new
  656. {
  657. ColorSequenceKeypoint.new(0,Color3.new(1,1,1));
  658. ColorSequenceKeypoint.new(0.5,Color3.new(0,0,0));
  659. ColorSequenceKeypoint.new(1,Color3.new(0,0,0));
  660. }
  661. tingy.SpreadAngle = Vector2.new(360,360)
  662. tingy.Speed = NumberRange.new(4.5,4.5)
  663. tingy.Rotation = NumberRange.new(-180,180)
  664. tingy.RotSpeed = NumberRange.new(-40,40)
  665. tingy.Lifetime = NumberRange.new(1,2)
  666. tingy.Name = "Core"
  667. tingy.Transparency = NumberSequence.new
  668. {
  669. NumberSequenceKeypoint.new(0,1);
  670. NumberSequenceKeypoint.new(0.1,0);
  671. NumberSequenceKeypoint.new(1,1);
  672. }
  673. tingy.Size = NumberSequence.new
  674. {
  675. NumberSequenceKeypoint.new(0,5);
  676. NumberSequenceKeypoint.new(1,2.5,2.5);
  677. }
  678. tingy.Texture = "http://www.roblox.com/asset/?id=445231898"
  679. tingy.LightEmission = 0
  680. tingy.LightInfluence = 1
  681. tingy.VelocityInheritance = 0
  682. tingy.ZOffset = 1
  683. tingy.Rate = 500
  684. local soundid1="rbxassetid://218410588"
  685. local soundid2="rbxassetid://416001005"
  686. local soundid3="rbxassetid://418168618"
  687. local s=Instance.new("Sound",ting)
  688. s.Name="BlinkSound1"
  689. s.SoundId=soundid1
  690. local s2=Instance.new("Sound",ting)
  691. s2.Name="BlinkSound2"
  692. s2.SoundId=soundid2
  693. local s3=Instance.new("Sound",ting)
  694. s3.Name="BlinkSound3"
  695. s3.SoundId=soundid3
  696. tingy.Enabled = true
  697. ting["BlinkSound" .. tostring(math.random(1,3))]:Play()
  698. wait(0.35)
  699. tingy.Enabled = false
  700. wait(3)
  701. ting:Destroy()
  702. end
  703. end))
  704. end
  705.  
  706. ------------
  707. --KEYBINDS--
  708. ------------
  709. mouse.KeyDown:connect(function(key)
  710. if key == "z" then
  711. turnOn()
  712. end
  713. end)
  714.  
  715. mouse.KeyDown:connect(function(key)
  716. if key == "x" then
  717. blast()
  718. end
  719. end)
  720.  
  721. mouse.KeyDown:connect(function(key)
  722. if key == "c" then
  723. --nothing for now
  724. end
  725. end)
  726.  
  727. mouse.KeyDown:connect(function(key)
  728. if key == "v" then
  729. --nothing for now
  730. end
  731. end)
  732.  
  733. mouse.KeyDown:connect(function(key)
  734. if key == "m" then
  735. music()
  736. end
  737. end)
  738.  
  739. mouse.KeyDown:connect(function(key)
  740. if key == "n" then
  741. blink()
  742. local MyBody = Player.Character
  743. local hit = mouse.Hit
  744. MyBody:MoveTo(hit.p)
  745. end
  746. end)
  747.  
  748. --------------------------
  749. --ANIMATIONS--
  750. --------------------------
  751. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  752. IDLEANIMATION:Play()
  753. while true do
  754. Swait()
  755. --------------------------
  756. --DEFAULT ANIM--
  757. --------------------------
  758. ANIMATE.Parent = nil
  759. SINE = SINE + CHANGE
  760. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  761. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  762. local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
  763. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
  764. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  765. if ANIM == "Walk" and Humanoid.MoveDirection ~= Vector3.new(0,0,0) then
  766. 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)
  767. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  768. 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)
  769. 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)
  770. elseif (ANIM ~= "Walk") or (Humanoid.MoveDirection == Vector3.new(0,0,0)) then
  771. 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)
  772. 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)
  773. 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)
  774. 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)
  775. end
  776. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  777. ANIM = "Jump"
  778. if ATTACK == false then
  779. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  780. 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)
  781. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  782. 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)
  783. 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)
  784. 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)
  785. end
  786. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  787. ANIM = "Idle"
  788. if ATTACK == false then
  789. 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)
  790. 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)
  791. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.6, 0) * ANGLES(RAD(11), RAD(-3), RAD(15)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  792. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-3), RAD(2), RAD(-15)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  793. 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)
  794. 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)
  795. end
  796. elseif Humanoid.MoveDirection ~= Vector3.new(0,0,0) and HITFLOOR ~= nil then
  797. ANIM = "Walk"
  798. WALK = WALK + 1 / Animation_Speed
  799. if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then
  800. WALK = 0
  801. if WALKINGANIM == true then
  802. WALKINGANIM = false
  803. elseif WALKINGANIM == false then
  804. WALKINGANIM = true
  805. end
  806. end
  807. --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)
  808. --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)
  809. if ATTACK == false then
  810. 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)
  811. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  812. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.6, 0) * ANGLES(RAD(-23), RAD(-11), RAD(15)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  813. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-23), RAD(11), RAD(-15)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  814. 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)
  815. 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)
  816. end
  817. end
  818. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement