Advertisement
StarzoZero

Roblox FE Sharp Shooter

Dec 23rd, 2018
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 76.62 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87.  
  88. --//====================================================\\--
  89. --|| CREATED BY SHACKLUSTER
  90. --\\====================================================//--
  91.  
  92.  
  93.  
  94. wait(0.2)
  95.  
  96.  
  97.  
  98. Player = owner
  99. PlayerGui = Player.PlayerGui
  100. Cam = workspace.CurrentCamera
  101. Backpack = Player.Backpack
  102. Character = Player.Character
  103. Humanoid = Character.Humanoid
  104. RootPart = Character["HumanoidRootPart"]
  105. Torso = Character["Torso"]
  106. Head = Character["Head"]
  107. RightArm = Character["Right Arm"]
  108. LeftArm = Character["Left Arm"]
  109. RightLeg = Character["Right Leg"]
  110. LeftLeg = Character["Left Leg"]
  111. RootJoint = RootPart["RootJoint"]
  112. Neck = Torso["Neck"]
  113. RightShoulder = Torso["Right Shoulder"]
  114. LeftShoulder = Torso["Left Shoulder"]
  115. RightHip = Torso["Right Hip"]
  116. LeftHip = Torso["Left Hip"]
  117.  
  118. IT = Instance.new
  119. CF = CFrame.new
  120. VT = Vector3.new
  121. RAD = math.rad
  122. C3 = Color3.new
  123. UD2 = UDim2.new
  124. BRICKC = BrickColor.new
  125. ANGLES = CFrame.Angles
  126. EULER = CFrame.fromEulerAnglesXYZ
  127. COS = math.cos
  128. ACOS = math.acos
  129. SIN = math.sin
  130. ASIN = math.asin
  131. ABS = math.abs
  132. MRANDOM = math.random
  133. FLOOR = math.floor
  134.  
  135. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  136. local NEWMESH = IT(MESH)
  137. if MESH == "SpecialMesh" then
  138. NEWMESH.MeshType = MESHTYPE
  139. if MESHID ~= "nil" and MESHID ~= "" then
  140. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  141. end
  142. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  143. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  144. end
  145. end
  146. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  147. NEWMESH.Scale = SCALE
  148. NEWMESH.Parent = PARENT
  149. return NEWMESH
  150. end
  151.  
  152. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
  153. local NEWPART = IT("Part")
  154. NEWPART.formFactor = FORMFACTOR
  155. NEWPART.Reflectance = REFLECTANCE
  156. NEWPART.Transparency = TRANSPARENCY
  157. NEWPART.CanCollide = false
  158. NEWPART.Locked = true
  159. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  160. NEWPART.Name = NAME
  161. NEWPART.Size = SIZE
  162. NEWPART.Position = Torso.Position
  163. NEWPART.Material = MATERIAL
  164. NEWPART:BreakJoints()
  165. NEWPART.Parent = PARENT
  166. return NEWPART
  167. end
  168.  
  169.  
  170. --//=================================\\
  171. --|| CUSTOMIZATION
  172. --\\=================================//
  173.  
  174. Class_Name = "Sharpshooter"
  175. Weapon_Name = "Add-ons"
  176.  
  177. Custom_Color_1 = BRICKC("Really black"); --1st color for the weapon.
  178. Custom_Color_2 = BRICKC("Maroon"); --2nd color for the weapon.
  179.  
  180. Custom_Color_3 = BRICKC("Really red"); --Color for the abilities.
  181. Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
  182. Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
  183. Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
  184. Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
  185.  
  186. Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
  187. Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
  188. Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
  189. Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
  190. Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
  191.  
  192.  
  193. Player_Size = 1 --Size of the player.
  194. Animation_Speed = 3
  195. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  196.  
  197. local Speed = 16
  198. local Effects2 = {}
  199.  
  200. --//=================================\\
  201. --|| END OF CUSTOMIZATION
  202. --\\=================================//
  203.  
  204. local function weldBetween(a, b)
  205. local weldd = Instance.new("ManualWeld")
  206. weldd.Part0 = a
  207. weldd.Part1 = b
  208. weldd.C0 = CFrame.new()
  209. weldd.C1 = b.CFrame:inverse() * a.CFrame
  210. weldd.Parent = a
  211. return weldd
  212. end
  213.  
  214. function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
  215. local acs = Instance.new("Part")
  216. acs.CanCollide = false
  217. acs.Anchored = false
  218. acs.Size = Vector3.new(0,0,0)
  219. acs.CFrame = attachmentpart.CFrame
  220. acs.Parent = Character
  221. acs.BrickColor = color
  222. local meshs = Instance.new("SpecialMesh")
  223. meshs.MeshId = mesh
  224. meshs.TextureId = texture
  225. meshs.Parent = acs
  226. meshs.Scale = scale
  227. meshs.Offset = offset
  228. weldBetween(attachmentpart,acs)
  229. end
  230.  
  231. function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
  232. if TYPE == "Gem" then
  233. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  234. acs.Anchored = false
  235. acs.CanCollide = false
  236. acs.CFrame = PART.CFrame
  237. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
  238. weldBetween(PART,acs)
  239. elseif TYPE == "Skull" then
  240. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  241. acs.Anchored = false
  242. acs.CanCollide = false
  243. acs.CFrame = PART.CFrame
  244. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
  245. weldBetween(PART,acs)
  246. elseif TYPE == "Eye" then
  247. local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
  248. acs.Anchored = false
  249. acs.CanCollide = false
  250. acs.CFrame = PART.CFrame
  251. local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
  252. weldBetween(PART,acs)
  253. end
  254. end
  255.  
  256. createaccessory(Head,"rbxassetid://151313536","rbxassetid://188595215",VT(2.5,2.5,2.5),VT(0, 0.7, 0.2),BRICKC"Really black")
  257.  
  258. --//=================================\\
  259. --|| USEFUL VALUES
  260. --\\=================================//
  261.  
  262. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  263. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  264. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  265. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  266. local CO1 = 0
  267. local CO2 = 0
  268. local CO3 = 0
  269. local CO4 = 0
  270. local CHANGEDEFENSE = 0
  271. local CHANGEDAMAGE = 0
  272. local CHANGEMOVEMENT = 0
  273. local ANIM = "Idle"
  274. local ATTACK = false
  275. local EQUIPPED = false
  276. local HOLD = false
  277. local COMBO = 1
  278. local LASTPOINT = nil
  279. local BLCF = nil
  280. local SCFR = nil
  281. local STAGGERHITANIM = false
  282. local STAGGERANIM = false
  283. local SPRINTING = false
  284. local STUNANIM = false
  285. local CRITCHANCENUMBER = 0
  286. local IDLENUMBER = 0
  287. local DONUMBER = 0
  288. local HANDIDLE = false
  289. local SINE = 0
  290. local CHANGE = 2 / Animation_Speed
  291. local WALKINGANIM = false
  292. local WALK = 0
  293. local DISABLEJUMPING = false
  294. local HASBEENBLOCKED = false
  295. local STUNDELAYNUMBER = 0
  296. local MANADELAYNUMBER = 0
  297. local SECONDARYMANADELAYNUMBER = 0
  298. local KEYHOLD = false
  299. local ROBLOXIDLEANIMATION = IT("Animation")
  300. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  301. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  302. --ROBLOXIDLEANIMATION.Parent = Humanoid
  303. local WEAPONGUI = IT("ScreenGui", nil)
  304. WEAPONGUI.Name = "Weapon GUI"
  305. local WEAPONTOOL = IT("HopperBin", nil)
  306. WEAPONTOOL.Name = Weapon_Name
  307. local Weapon = IT("Model")
  308. Weapon.Name = Weapon_Name
  309. local Effects = IT("Folder", Weapon)
  310. Effects.Name = "Effects"
  311. local ANIMATOR = Humanoid.Animator
  312. local ANIMATE = Character.Animate
  313. local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
  314. local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
  315. local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
  316. local HITBLOCKSOUNDS = {"199148933", "199148947"}
  317. local UNANCHOR = true
  318.  
  319. --//=================================\\
  320. --\\=================================//
  321.  
  322.  
  323.  
  324.  
  325. --//=================================\\
  326. --|| DEBUFFS / BUFFS
  327. --\\=================================//
  328.  
  329. local DEFENSECHANGE1 = IT("NumberValue", ChangeStat)
  330. DEFENSECHANGE1.Name = "ChangeDefense"
  331. DEFENSECHANGE1.Value = 0
  332.  
  333. local MOVEMENTCHANGE1 = IT("NumberValue", nil)
  334. MOVEMENTCHANGE1.Name = "ChangeMovement"
  335. MOVEMENTCHANGE1.Value = 0
  336.  
  337. --//=================================\\
  338. --\\=================================//
  339.  
  340.  
  341.  
  342.  
  343.  
  344. --//=================================\\
  345. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  346. --\\=================================//
  347.  
  348. ArtificialHB = Instance.new("BindableEvent", script)
  349. ArtificialHB.Name = "ArtificialHB"
  350.  
  351. script:WaitForChild("ArtificialHB")
  352.  
  353. frame = Frame_Speed
  354. tf = 0
  355. allowframeloss = false
  356. tossremainder = false
  357. lastframe = tick()
  358. script.ArtificialHB:Fire()
  359.  
  360. game:GetService("RunService").Heartbeat:connect(function(s, p)
  361. tf = tf + s
  362. if tf >= frame then
  363. if allowframeloss then
  364. script.ArtificialHB:Fire()
  365. lastframe = tick()
  366. else
  367. for i = 1, math.floor(tf / frame) do
  368. script.ArtificialHB:Fire()
  369. end
  370. lastframe = tick()
  371. end
  372. if tossremainder then
  373. tf = 0
  374. else
  375. tf = tf - frame * math.floor(tf / frame)
  376. end
  377. end
  378. end)
  379.  
  380. --//=================================\\
  381. --\\=================================//
  382.  
  383.  
  384.  
  385.  
  386.  
  387. --//=================================\\
  388. --|| SOME FUNCTIONS
  389. --\\=================================//
  390.  
  391. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  392. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  393. end
  394.  
  395. function PositiveAngle(NUMBER)
  396. if NUMBER >= 0 then
  397. NUMBER = 0
  398. end
  399. return NUMBER
  400. end
  401.  
  402. function NegativeAngle(NUMBER)
  403. if NUMBER <= 0 then
  404. NUMBER = 0
  405. end
  406. return NUMBER
  407. end
  408.  
  409. function Swait(NUMBER)
  410. if NUMBER == 0 or NUMBER == nil then
  411. ArtificialHB.Event:wait()
  412. else
  413. for i = 1, NUMBER do
  414. ArtificialHB.Event:wait()
  415. end
  416. end
  417. end
  418.  
  419. function QuaternionFromCFrame(cf)
  420. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  421. local trace = m00 + m11 + m22
  422. if trace > 0 then
  423. local s = math.sqrt(1 + trace)
  424. local recip = 0.5 / s
  425. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  426. else
  427. local i = 0
  428. if m11 > m00 then
  429. i = 1
  430. end
  431. if m22 > (i == 0 and m00 or m11) then
  432. i = 2
  433. end
  434. if i == 0 then
  435. local s = math.sqrt(m00 - m11 - m22 + 1)
  436. local recip = 0.5 / s
  437. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  438. elseif i == 1 then
  439. local s = math.sqrt(m11 - m22 - m00 + 1)
  440. local recip = 0.5 / s
  441. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  442. elseif i == 2 then
  443. local s = math.sqrt(m22 - m00 - m11 + 1)
  444. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  445. end
  446. end
  447. end
  448.  
  449. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  450. local xs, ys, zs = x + x, y + y, z + z
  451. local wx, wy, wz = w * xs, w * ys, w * zs
  452. local xx = x * xs
  453. local xy = x * ys
  454. local xz = x * zs
  455. local yy = y * ys
  456. local yz = y * zs
  457. local zz = z * zs
  458. 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))
  459. end
  460.  
  461. function QuaternionSlerp(a, b, t)
  462. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  463. local startInterp, finishInterp;
  464. if cosTheta >= 0.0001 then
  465. if (1 - cosTheta) > 0.0001 then
  466. local theta = ACOS(cosTheta)
  467. local invSinTheta = 1 / SIN(theta)
  468. startInterp = SIN((1 - t) * theta) * invSinTheta
  469. finishInterp = SIN(t * theta) * invSinTheta
  470. else
  471. startInterp = 1 - t
  472. finishInterp = t
  473. end
  474. else
  475. if (1 + cosTheta) > 0.0001 then
  476. local theta = ACOS(-cosTheta)
  477. local invSinTheta = 1 / SIN(theta)
  478. startInterp = SIN((t - 1) * theta) * invSinTheta
  479. finishInterp = SIN(t * theta) * invSinTheta
  480. else
  481. startInterp = t - 1
  482. finishInterp = t
  483. end
  484. end
  485. 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
  486. end
  487.  
  488. function Clerp(a, b, t)
  489. local qa = {QuaternionFromCFrame(a)}
  490. local qb = {QuaternionFromCFrame(b)}
  491. local ax, ay, az = a.x, a.y, a.z
  492. local bx, by, bz = b.x, b.y, b.z
  493. local _t = 1 - t
  494. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  495. end
  496.  
  497. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  498. local frame = IT("Frame")
  499. frame.BackgroundTransparency = TRANSPARENCY
  500. frame.BorderSizePixel = BORDERSIZEPIXEL
  501. frame.Position = POSITION
  502. frame.Size = SIZE
  503. frame.BackgroundColor3 = COLOR
  504. frame.BorderColor3 = BORDERCOLOR
  505. frame.Name = NAME
  506. frame.Parent = PARENT
  507. return frame
  508. end
  509.  
  510. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  511. local label = IT("TextLabel")
  512. label.BackgroundTransparency = 1
  513. label.Size = UD2(1, 0, 1, 0)
  514. label.Position = UD2(0, 0, 0, 0)
  515. label.TextColor3 = C3(255, 255, 255)
  516. label.TextStrokeTransparency = STROKETRANSPARENCY
  517. label.TextTransparency = TRANSPARENCY
  518. label.FontSize = TEXTFONTSIZE
  519. label.Font = TEXTFONT
  520. label.BorderSizePixel = BORDERSIZEPIXEL
  521. label.TextScaled = true
  522. label.Text = TEXT
  523. label.Name = NAME
  524. label.Parent = PARENT
  525. return label
  526. end
  527.  
  528. function NoOutlines(PART)
  529. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  530. end
  531.  
  532.  
  533. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  534. local NEWWELD = IT(TYPE)
  535. NEWWELD.Part0 = PART0
  536. NEWWELD.Part1 = PART1
  537. NEWWELD.C0 = C0
  538. NEWWELD.C1 = C1
  539. NEWWELD.Parent = PARENT
  540. return NEWWELD
  541. end
  542.  
  543. function CreateSound(ID, PARENT, VOLUME, PITCH)
  544. coroutine.resume(coroutine.create(function()
  545. local NEWSOUND = IT("Sound", PARENT)
  546. NEWSOUND.Volume = VOLUME
  547. NEWSOUND.Pitch = PITCH
  548. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  549. Swait()
  550. NEWSOUND:play()
  551. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  552. end))
  553. end
  554.  
  555. function CFrameFromTopBack(at, top, back)
  556. local right = top:Cross(back)
  557. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  558. end
  559.  
  560. function Lightning(POSITION1, POSITION2, MULTIPLIERTIME, LIGHTNINGDELAY, OFFSET, BRICKCOLOR, MATERIAL, SIZE, TRANSPARENCY, LASTINGTIME)
  561. local MAGNITUDE = (POSITION1 - POSITION2).magnitude
  562. local CURRENTPOSITION = POSITION1
  563. local LIGHTNINGOFFSET = {-OFFSET, OFFSET}
  564. coroutine.resume(coroutine.create(function()
  565. for i = 1, MULTIPLIERTIME do
  566. local LIGHTNINGPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR,"Effect", VT(SIZE * Player_Size, SIZE * Player_Size, MAGNITUDE / MULTIPLIERTIME))
  567. LIGHTNINGPART.Anchored = true
  568. local LIGHTNINGOFFSET2 = VT(LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)])
  569. local LIGHTNINGPOSITION1 = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME).p + LIGHTNINGOFFSET2
  570. if MULTIPLIERTIME == i then
  571. local LIGHTNINGMAGNITUDE1 = (CURRENTPOSITION - POSITION2).magnitude
  572. LIGHTNINGPART.Size = VT(SIZE * Player_Size, SIZE * Player_Size, LIGHTNINGMAGNITUDE1)
  573. LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, -LIGHTNINGMAGNITUDE1 / 2)
  574. else
  575. LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, LIGHTNINGPOSITION1) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2)
  576. end
  577. CURRENTPOSITION=LIGHTNINGPART.CFrame * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2).p
  578. game.Debris:AddItem(LIGHTNINGPART, LASTINGTIME)
  579. coroutine.resume(coroutine.create(function()
  580. while LIGHTNINGPART.Transparency ~= 1 do
  581. --local StartTransparency = tra
  582. for i=0, 1, LASTINGTIME do
  583. Swait()
  584. LIGHTNINGPART.Transparency = LIGHTNINGPART.Transparency + (0.1 / LASTINGTIME)
  585. end
  586. end
  587. end))
  588. Swait(LIGHTNINGDELAY / Animation_Speed)
  589. end
  590. end))
  591. end
  592.  
  593. function MagicBlock(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  594. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  595. EFFECTPART.Anchored = true
  596. EFFECTPART.CFrame = CFRAME
  597. local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  598. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  599. coroutine.resume(coroutine.create(function(PART, MESH)
  600. for i = 0, 1, delay do
  601. Swait()
  602. PART.CFrame = PART.CFrame * ROTATION
  603. PART.Transparency = i
  604. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  605. end
  606. PART.Parent = nil
  607. end), EFFECTPART, EFFECTMESH)
  608. end
  609.  
  610. function MagicSphere(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  611. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  612. EFFECTPART.Anchored = true
  613. EFFECTPART.CFrame = CFRAME
  614. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Sphere", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  615. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  616. coroutine.resume(coroutine.create(function(PART, MESH)
  617. for i = 0, 1, delay do
  618. Swait()
  619. PART.CFrame = PART.CFrame * ROTATION
  620. PART.Transparency = i
  621. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  622. end
  623. PART.Parent = nil
  624. end), EFFECTPART, EFFECTMESH)
  625. end
  626.  
  627. function MagicCylinder(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  628. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  629. EFFECTPART.Anchored = true
  630. EFFECTPART.CFrame = CFRAME
  631. local EFFECTMESH = CreateMesh("CylinderMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  632. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  633. coroutine.resume(coroutine.create(function(PART, MESH)
  634. for i = 0, 1, delay do
  635. Swait()
  636. PART.CFrame = PART.CFrame * ROTATION
  637. PART.Transparency = i
  638. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  639. end
  640. PART.Parent = nil
  641. end), EFFECTPART, EFFECTMESH)
  642. end
  643.  
  644. function MagicHead(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  645. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  646. EFFECTPART.Anchored = true
  647. EFFECTPART.CFrame = CFRAME
  648. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Head", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  649. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  650. coroutine.resume(coroutine.create(function(PART, MESH)
  651. for i = 0, 1, delay do
  652. Swait()
  653. PART.CFrame = PART.CFrame * ROTATION
  654. PART.Transparency = i
  655. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  656. end
  657. PART.Parent = nil
  658. end), EFFECTPART, EFFECTMESH)
  659. end
  660.  
  661. function MagicRing(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  662. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  663. EFFECTPART.Anchored = true
  664. EFFECTPART.CFrame = CFRAME
  665. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "3270017", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  666. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  667. coroutine.resume(coroutine.create(function(PART, MESH)
  668. for i = 0, 1, delay do
  669. Swait()
  670. PART.CFrame = PART.CFrame * ROTATION
  671. PART.Transparency = i
  672. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  673. end
  674. PART.Parent = nil
  675. end), EFFECTPART, EFFECTMESH)
  676. end
  677.  
  678. function MagicWave(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  679. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  680. EFFECTPART.Anchored = true
  681. EFFECTPART.CFrame = CFRAME
  682. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "20329976", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), VT(0, 0, (-0.1 * Z1)) + (OFFSET * Player_Size))
  683. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  684. coroutine.resume(coroutine.create(function(PART, MESH)
  685. for i = 0, 1, delay do
  686. Swait()
  687. PART.CFrame = PART.CFrame * ROTATION
  688. PART.Transparency = i
  689. MESH.Offset = VT(0, 0, (-0.1 * MESH.Scale.Z))
  690. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  691. end
  692. PART.Parent = nil
  693. end), EFFECTPART, EFFECTMESH)
  694. end
  695.  
  696. function MagicCrystal(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  697. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  698. EFFECTPART.Anchored = true
  699. EFFECTPART.CFrame = CFRAME
  700. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "9756362", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  701. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  702. coroutine.resume(coroutine.create(function(PART, MESH)
  703. for i = 0, 1, delay do
  704. Swait()
  705. PART.CFrame = PART.CFrame * ROTATION
  706. PART.Transparency = i
  707. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  708. end
  709. PART.Parent = nil
  710. end), EFFECTPART, EFFECTMESH)
  711. end
  712.  
  713. function MagicSwirl(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  714. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  715. EFFECTPART.Anchored = true
  716. EFFECTPART.CFrame = CFRAME
  717. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1051557", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  718. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  719. coroutine.resume(coroutine.create(function(PART, MESH)
  720. for i = 0, 1, delay do
  721. Swait()
  722. PART.CFrame = PART.CFrame * ROTATION
  723. PART.Transparency = i
  724. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  725. end
  726. PART.Parent = nil
  727. end), EFFECTPART, EFFECTMESH)
  728. end
  729.  
  730. function MagicSharpCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  731. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  732. EFFECTPART.Anchored = true
  733. EFFECTPART.CFrame = CFRAME
  734. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1778999", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  735. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  736. coroutine.resume(coroutine.create(function(PART, MESH)
  737. for i = 0, 1, delay do
  738. Swait()
  739. PART.CFrame = PART.CFrame * ROTATION
  740. PART.Transparency = i
  741. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  742. end
  743. PART.Parent = nil
  744. end), EFFECTPART, EFFECTMESH)
  745. end
  746.  
  747. function MagicFlatCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  748. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  749. EFFECTPART.Anchored = true
  750. EFFECTPART.CFrame = CFRAME
  751. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1033714", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  752. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  753. coroutine.resume(coroutine.create(function(PART, MESH)
  754. for i = 0, 1, delay do
  755. Swait()
  756. PART.CFrame = PART.CFrame * ROTATION
  757. PART.Transparency = i
  758. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  759. end
  760. PART.Parent = nil
  761. end), EFFECTPART, EFFECTMESH)
  762. end
  763.  
  764. function MagicSpikedCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  765. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  766. EFFECTPART.Anchored = true
  767. EFFECTPART.CFrame = CFRAME
  768. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1323306", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  769. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  770. coroutine.resume(coroutine.create(function(PART, MESH)
  771. for i = 0, 1, delay do
  772. Swait()
  773. PART.CFrame = PART.CFrame * ROTATION
  774. PART.Transparency = i
  775. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  776. end
  777. PART.Parent = nil
  778. end), EFFECTPART, EFFECTMESH)
  779. end
  780.  
  781. function MagicFlatCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  782. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  783. EFFECTPART.Anchored = true
  784. EFFECTPART.CFrame = CFRAME
  785. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1078075", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  786. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  787. coroutine.resume(coroutine.create(function(PART, MESH)
  788. for i = 0, 1, delay do
  789. Swait()
  790. PART.CFrame = PART.CFrame * ROTATION
  791. PART.Transparency = i
  792. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  793. end
  794. PART.Parent = nil
  795. end), EFFECTPART, EFFECTMESH)
  796. end
  797.  
  798. function MagicSkull(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
  799. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  800. EFFECTPART.Anchored = true
  801. EFFECTPART.CFrame = CFRAME
  802. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
  803. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  804. coroutine.resume(coroutine.create(function(PART, MESH)
  805. for i = 0, 1, delay do
  806. Swait()
  807. PART.CFrame = PART.CFrame * ROTATION
  808. PART.Transparency = i
  809. MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
  810. end
  811. PART.Parent = nil
  812. end), EFFECTPART, EFFECTMESH)
  813. end
  814.  
  815. function ElectricEffect(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X, Y, Z, delay)
  816. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
  817. EFFECTPART.Anchored = true
  818. EFFECTPART.CFrame = CFRAME
  819. local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X * Player_Size, Y * Player_Size, Z * Player_Size), OFFSET * Player_Size)
  820. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  821. local XVALUE = MRANDOM()
  822. local YVALUE = MRANDOM()
  823. local ZVALUE = MRANDOM()
  824. coroutine.resume(coroutine.create(function(PART, MESH, THEXVALUE, THEYVALUE, THEZVALUE)
  825. for i = 0, 1, delay do
  826. Swait()
  827. PART.CFrame = PART.CFrame * ROTATION
  828. PART.Transparency = i
  829. THEXVALUE = THEXVALUE - 0.1 * (delay * 10)
  830. THEYVALUE = THEYVALUE - 0.1 * (delay * 10)
  831. THEZVALUE = THEZVALUE - 0.1 * (delay * 10)
  832. MESH.Scale = MESH.Scale + VT(THEXVALUE * Player_Size, THEYVALUE * Player_Size, THEZVALUE * Player_Size)
  833. end
  834. PART.Parent = nil
  835. end), EFFECTPART, EFFECTMESH, XVALUE, YVALUE, ZVALUE)
  836. end
  837.  
  838. function TrailEffect(BRICKCOLOR, MATERIAL, CURRENTCFRAME, OLDCFRAME, MESHTYPE, REFLECTANCE, SIZE, ROTATION, X, Y, Z, delay)
  839. local MAGNITUDECFRAME = (CURRENTCFRAME.p - OLDCFRAME.p).magnitude
  840. if MAGNITUDECFRAME > (1 / 100) then
  841. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT(1, MAGNITUDECFRAME, 1))
  842. EFFECTPART.Anchored = true
  843. EFFECTPART.CFrame = CF((CURRENTCFRAME.p + OLDCFRAME.p) / 2, OLDCFRAME.p) * ANGLES(RAD(90), 0, 0)
  844. local THEMESHTYPE = "BlockMesh"
  845. if MESHTYPE == "Cylinder" then
  846. THEMESHTYPE = "CylinderMesh"
  847. end
  848. local EFFECTMESH = CreateMesh(THEMESHTYPE, EFFECTPART, "", "", "", VT(0 + SIZE * Player_Size, 1, 0 + SIZE * Player_Size), VT(0, 0, 0))
  849. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  850. coroutine.resume(coroutine.create(function(PART, MESH)
  851. for i = 0, 1, delay do
  852. Swait()
  853. PART.CFrame = PART.CFrame * ROTATION
  854. PART.Transparency = i
  855. MESH.Scale = MESH.Scale + VT(X * Player_Size, Y * Player_Size, Z * Player_Size)
  856. end
  857. PART.Parent = nil
  858. end), EFFECTPART, EFFECTMESH)
  859. end
  860. end
  861.  
  862. function ClangEffect(BRICKCOLOR, MATERIAL, CFRAME, ANGLE, DURATION, SIZE, POWER, REFLECTANCE, X, Y, Z, delay)
  863. local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 1, BRICKCOLOR, "Effect", VT())
  864. EFFECTPART.Anchored = true
  865. EFFECTPART.CFrame = CFRAME
  866. local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(0, 0, 0), VT(0, 0, 0))
  867. game:GetService("Debris"):AddItem(EFFECTPART, 10)
  868. local THELASTPOINT = CFRAME
  869. coroutine.resume(coroutine.create(function(PART)
  870. for i = 1, DURATION do
  871. Swait()
  872. PART.CFrame = PART.CFrame * ANGLES(RAD(ANGLE), 0, 0) * CF(0, POWER * Player_Size, 0)
  873. TrailEffect(BRICKCOLOR, MATERIAL, PART.CFrame, THELASTPOINT, "Cylinder", REFLECTANCE, SIZE * Player_Size, ANGLES(0, 0, 0), X * Player_Size, Y * Player_Size, Z * Player_Size, delay)
  874. THELASTPOINT = PART.CFrame
  875. end
  876. PART.Parent = nil
  877. end), EFFECTPART)
  878. end
  879.  
  880. --local list={}
  881. function Triangle(Color, Material, a, b, c, delay)
  882. local edge1 = (c - a):Dot((b - a).unit)
  883. local edge2 = (a - b):Dot((c - b).unit)
  884. local edge3 = (b - c):Dot((a - c).unit)
  885. if edge1 <= (b - a).magnitude and edge1 >= 0 then
  886. a, b, c=a, b, c
  887. elseif edge2 <= (c - b).magnitude and edge2 >= 0 then
  888. a, b, c=b, c, a
  889. elseif edge3 <= (a - c).magnitude and edge3 >= 0 then
  890. a, b, c=c, a, b
  891. else
  892. assert(false, "unreachable")
  893. end
  894. local len1 = (c - a):Dot((b - a).unit)
  895. local len2 = (b - a).magnitude - len1
  896. local width = (a + (b - a).unit * len1 - c).magnitude
  897. local maincf = CFrameFromTopBack(a, (b - a):Cross(c - b).unit, - (b - a).unit)
  898. if len1 > 1 / 100 then
  899. local sz = VT(0.2, width, len1)
  900. local w1 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz)
  901. local sp = CreateMesh("SpecialMesh", w1, "Wedge", "", "", VT(0, 1, 1) * sz / w1.Size, VT(0, 0, 0))
  902. w1.Anchored = true
  903. w1.CFrame = maincf * ANGLES(math.pi, 0, math.pi / 2) * CF(0, width / 2, len1 / 2)
  904. coroutine.resume(coroutine.create(function()
  905. for i = 0.5, 1, delay * (2 / Animation_Speed) do
  906. Swait()
  907. w1.Transparency = i
  908. end
  909. w1.Parent = nil
  910. end))
  911. game:GetService("Debris"):AddItem(w1, 10)
  912. --table.insert(list, w1)
  913. end
  914. if len2 > 1 / 100 then
  915. local sz = VT(0.2, width, len2)
  916. local w2 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz)
  917. local sp = CreateMesh("SpecialMesh", w2, "Wedge", "", "", VT(0, 1, 1) * sz / w2.Size, VT(0, 0, 0))
  918. w2.Anchored = true
  919. w2.CFrame = maincf * ANGLES(math.pi, math.pi, -math.pi / 2) * CF(0, width / 2, -len1 - len2 / 2)
  920. coroutine.resume(coroutine.create(function()
  921. for i = 0.5, 1, delay * (2 / Animation_Speed) do
  922. Swait()
  923. w2.Transparency = i
  924. end
  925. w2.Parent = nil
  926. end))
  927. game:GetService("Debris"):AddItem(w2, 10)
  928. --table.insert(list, w2)
  929. end
  930. --return unpack(list)
  931. end
  932.  
  933. --[[Usage:
  934. local Pos = Part
  935. local Offset = Part.CFrame * CF(0, 0, 0)
  936. local Color = "Institutional white"
  937. local Material = "Neon"
  938. local TheDelay = 0.01
  939. local Height = 4
  940. BLCF = Offset
  941. if SCFR and (Pos.Position - SCFR.p).magnitude > 0.1 then
  942. local a, b = Triangle(Color, Material, (SCFR * CF(0, Height / 2,0)).p, (SCFR * CF(0, -Height / 2, 0)).p, (BLCF * CF(0, Height / 2,0)).p, TheDelay)
  943. if a then game:GetService("Debris"):AddItem(a, 1) end
  944. if b then game:GetService("Debris"):AddItem(b, 1) end
  945. local a, b = Triangle(Color, Material, (BLCF * CF(0, Height / 2, 0)).p, (BLCF * CF(0, -Height / 2, 0)).p, (SCFR * CF(0, -Height / 2, 0)).p, TheDelay)
  946. if a then game:GetService("Debris"):AddItem(a, 1) end
  947. if b then game:GetService("Debris"):AddItem(b, 1) end
  948. SCFR = BLCF
  949. elseif not SCFR then
  950. SCFR = BLCF
  951. end
  952. --
  953. BLCF = nil
  954. SCFR = nil
  955. --]]
  956.  
  957. --//=================================\\
  958. --\\=================================//
  959.  
  960.  
  961.  
  962.  
  963. --//=================================\\
  964. --|| WEAPON CREATION
  965. --\\=================================//
  966.  
  967. local part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Handle", VT(1.05*Player_Size,2.05*Player_Size,1.05*Player_Size))
  968. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  969. local part = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Handle", VT(1.07*Player_Size,1.07*Player_Size,1.07*Player_Size))
  970. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  971. local part = CreatePart(3, Weapon, "Granite", 0, 0, "Maroon", "Handle", VT(1.07*Player_Size,0.5*Player_Size,1.07*Player_Size))
  972. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0 * Player_Size, 0.85 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  973. local part = CreatePart(3, Weapon, "Granite", 0, 0, "Maroon", "Handle", VT(0.5*Player_Size,0.5*Player_Size,1.07*Player_Size))
  974. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0.4 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  975. local part = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Handle", VT(0.7*Player_Size,0.5*Player_Size,1.07*Player_Size))
  976. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(-0.2 * Player_Size, 0.25 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  977. local part = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Handle", VT(0.5*Player_Size,1.5*Player_Size, 0.5*Player_Size))
  978. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0.35 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  979. local part = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Handle", VT(0.5*Player_Size,1.5*Player_Size, 0.5*Player_Size))
  980. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(-0.35 * Player_Size, 0.4 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  981. local part = CreatePart(3, Weapon, "Metal", 0, 0, "Maroon", "Handle", VT(0.5*Player_Size,0.5*Player_Size, 1.2*Player_Size))
  982. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(-0.2 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  983.  
  984. local part = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Handle", VT(0.2*Player_Size,0.2*Player_Size, 0.2*Player_Size))
  985. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0.4 * Player_Size, 0.12 * Player_Size, -0.75 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)), CF(0, 0, 0))
  986. local mesh = IT("SpecialMesh",part)
  987. mesh.MeshType = "FileMesh"
  988. mesh.MeshId = "http://www.roblox.com/asset/?id=55821108"
  989.  
  990. local part = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Handle", VT(0.2*Player_Size,0.2*Player_Size, 0.2*Player_Size))
  991. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0.4 * Player_Size, 0.12 * Player_Size, 0.75 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(0)), CF(0, 0, 0))
  992. local mesh = IT("SpecialMesh",part)
  993. mesh.MeshType = "FileMesh"
  994. mesh.MeshId = "http://www.roblox.com/asset/?id=55820516"
  995.  
  996. local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Handle", VT(0.35*Player_Size,0.35*Player_Size, 1.25*Player_Size))
  997. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(-0.2 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  998. local part = CreatePart(3, Weapon, "Metal", 0, 0, "Maroon", "Handle", VT(0.5*Player_Size,0.5*Player_Size, 1.2*Player_Size))
  999. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(-0.2 * Player_Size, -0.7 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1000. local part = CreatePart(3, Weapon, "Metal", 0, 0, "Maroon", "Handle", VT(1.1*Player_Size,0.2*Player_Size, 1.1*Player_Size))
  1001. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0 * Player_Size, -0.7 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1002. local part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Handle", VT(1.15*Player_Size,0.05*Player_Size, 1.15*Player_Size))
  1003. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0 * Player_Size, -0.7 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1004. local part = CreatePart(3, Weapon, "Granite", 0, 0, "Maroon", "Handle", VT(1*Player_Size,0.1*Player_Size,1*Player_Size))
  1005. local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1006. local mesh = IT("CylinderMesh",part)
  1007.  
  1008. local beampart = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Handle", VT(0.6*Player_Size,0.1*Player_Size,0.6*Player_Size))
  1009. local weld = CreateWeldOrSnapOrMotor("Weld", beampart, RightArm, beampart, CF(0 * Player_Size, -1.02 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1010. local mesh = IT("CylinderMesh",beampart)
  1011.  
  1012. for _, c in pairs(Weapon:GetChildren()) do
  1013. if c.ClassName == "Part" then
  1014. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  1015. end
  1016. end
  1017.  
  1018. Weapon.Parent = Character
  1019.  
  1020. Humanoid.Died:connect(function()
  1021. ATTACK = true
  1022. end)
  1023.  
  1024. print(Class_Name.." loaded.")
  1025.  
  1026. --//=================================\\
  1027. --\\=================================//
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033. --//=================================\\
  1034. --|| DAMAGE FUNCTIONS
  1035. --\\=================================//
  1036.  
  1037. function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR)
  1038. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  1039. STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0))
  1040. local BODYGYRO = IT("BodyGyro", STATPART)
  1041. local BODYPOSITION = IT("BodyPosition", STATPART)
  1042. BODYPOSITION.P = 2000
  1043. BODYPOSITION.D = 100
  1044. BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge)
  1045. if LABELTYPE == "Normal" then
  1046. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2))
  1047. elseif LABELTYPE == "Debuff" then
  1048. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 8, MRANDOM(-2, 2))
  1049. elseif LABELTYPE == "Interruption" then
  1050. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2,2), 8, MRANDOM(-2, 2))
  1051. end
  1052. game:GetService("Debris"):AddItem(STATPART ,5)
  1053. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  1054. BILLBOARDGUI.Adornee = STATPART
  1055. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  1056. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  1057. BILLBOARDGUI.AlwaysOnTop = false
  1058. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  1059. TEXTLABEL.BackgroundTransparency = 1
  1060. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  1061. TEXTLABEL.Text = TEXT
  1062. TEXTLABEL.Font = "SciFi"
  1063. TEXTLABEL.FontSize="Size42"
  1064. TEXTLABEL.TextColor3 = COLOR
  1065. TEXTLABEL.TextStrokeTransparency = 1
  1066. TEXTLABEL.TextScaled = true
  1067. TEXTLABEL.TextWrapped = true
  1068. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  1069. wait(0.2)
  1070. for i=1, 5 do
  1071. wait()
  1072. THEBODYPOSITION.Position = THEPART.Position - VT(0, 0.5 ,0)
  1073. end
  1074. wait(1.2)
  1075. for i=1, 5 do
  1076. wait()
  1077. THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2
  1078. THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2
  1079. THEBODYPOSITION.position = THEPART.Position + VT(0, 0.5, 0)
  1080. end
  1081. THEPART.Parent = nil
  1082. end),STATPART, BODYPOSITION, TEXTLABEL)
  1083. end
  1084.  
  1085. function dealdamage(hit,min,max,maxstrength,beserk,critrate,critmultiplier)
  1086. if hit.Parent ~= Character and hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent:FindFirstChild("HitBy"..Player.Name) == nil then
  1087. local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
  1088. local dmg = math.random(min,max)
  1089. if humanoid.Health > 0 then
  1090. if beserk == true then
  1091. humanoid.Health = 0
  1092. humanoid.Parent:BreakJoints()
  1093. StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), "BESERK/inf", C3(255/255, 0, 0))
  1094. else
  1095. CreateSound("260430060", hit, 1.2, MRANDOM(7, 12) / 10)
  1096. hit.Velocity = CFrame.new(Torso.Position,hit.Position).lookVector*5*maxstrength
  1097. if math.random(1,100) < critrate+1 then
  1098. humanoid.Health = humanoid.Health - dmg*critmultiplier
  1099. StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0))
  1100. else
  1101. humanoid.Health = humanoid.Health - dmg
  1102. StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), dmg, C3(0, 0, 0))
  1103. end
  1104. local defence = Instance.new("BoolValue",hit.Parent)
  1105. defence.Name = ("HitBy"..Player.Name)
  1106. game:GetService("Debris"):AddItem(defence, 0.5)
  1107. end
  1108. end
  1109. end
  1110. end
  1111.  
  1112. function AoEDamage(position,radius,min,max,maxstrength,beserk,critrate,critmultiplier,CanBeDodgedByJumping)
  1113. local dmg = (math.random(min,max)/5)
  1114. for i,v in ipairs(workspace:GetChildren()) do
  1115. local body = v:GetChildren()
  1116. for part = 1, #body do
  1117. if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  1118. if(body[part].Position - position).Magnitude < radius then
  1119. if v.ClassName == "Model" then
  1120. if v:FindFirstChild("Humanoid") and v:FindFirstChild("HitBy"..Player.Name) == nil then
  1121. if CanBeDodgedByJumping == true then
  1122. if v.Humanoid.Jump == false then
  1123. if math.random(1,100) < critrate+1 then
  1124. v.Humanoid.Health = v.Humanoid.Health - dmg*critmultiplier
  1125. --StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0))
  1126. else
  1127. v.Humanoid.Health = v.Humanoid.Health - dmg
  1128. --StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), dmg, C3(0, 0, 0))
  1129. end
  1130. local defence = Instance.new("BoolValue",v.Parent)
  1131. defence.Name = ("HitBy"..Player.Name)
  1132. game:GetService("Debris"):AddItem(defence, 0.5)
  1133. end
  1134. else
  1135. if beserk == true then
  1136. v.Humanoid.Health = 0
  1137. end
  1138. if math.random(1,100) < critrate+1 then
  1139. v.Humanoid.Health = v.Humanoid.Health - dmg*critmultiplier
  1140. --StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0))
  1141. else
  1142. v.Humanoid.Health = v.Humanoid.Health - dmg
  1143. --StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), dmg, C3(0, 0, 0))
  1144. end
  1145. local defence = Instance.new("BoolValue",v.Parent)
  1146. defence.Name = ("HitBy"..Player.Name)
  1147. game:GetService("Debris"):AddItem(defence, 0.5)
  1148. end
  1149. end
  1150. end
  1151. body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength
  1152. end
  1153. end
  1154. end
  1155. if v.ClassName == "Part" then
  1156. if v.Anchored == false and (v.Position - position).Magnitude < radius then
  1157. v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength
  1158. end
  1159. end
  1160. end
  1161. end
  1162.  
  1163. --//=================================\\
  1164. --|| ATTACK FUNCTIONS AND STUFF
  1165. --\\=================================//
  1166.  
  1167. function turnto(position)
  1168. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  1169. end
  1170.  
  1171. function CastRay(StartPos, Vec, Length, Ignore)
  1172. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  1173. local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Vec * Length), Ignore)
  1174. return RayHit, RayPos
  1175. end
  1176.  
  1177. function Shoot()
  1178. Rooted = true
  1179. ATTACK = true
  1180. for i=0, 1, 0.1 / Animation_Speed do
  1181. Swait()
  1182. turnto(Mouse.Hit.p)
  1183. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0.05 * Player_Size, 0 * Player_Size, -0.1 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(40)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed/5)
  1184. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-40)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1185. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  1186. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(10 - 2.5 * COS(SINE / 16)), RAD(0), RAD(-25 + 2.5 * SIN(SINE / 24))) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1187. RightHip.C0 = Clerp(RightHip.C0, CF(0.95 * Player_Size, -1 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-1.25), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1188. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * Player_Size, 0.25 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1189. end
  1190. --local RayHit, RayPos = CastRay(beampart.Position,Mouse.Hit.p,100,Character)
  1191. MagicBlock("Really red", "Neon", beampart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), 0.25, 0.25, 0.25, 1.5, 1.5, 1.5, 0.05)
  1192. CreateSound("379225925", beampart, 3, 1.1)
  1193. local laser = IT("Part",Effects)
  1194. laser.CanCollide = false
  1195. laser.Anchored = true
  1196. local distance = (beampart.Position - Mouse.Hit.p).magnitude
  1197. laser.Size = Vector3.new(0.2, 0.2, distance)
  1198. laser.CFrame = CFrame.new(beampart.Position,Mouse.Hit.p) * CFrame.new(0, 0, -distance/2)
  1199. laser.Material = "Neon"
  1200. laser.BrickColor = BRICKC("Really red")
  1201. table.insert(Effects2,{laser,"Disappear",0.05,2,2,2,2})
  1202. AoEDamage(Mouse.Hit.p,5,25,35,12,false,10,2)
  1203. MagicSphere("Really red", "Neon", CF(Mouse.Hit.p) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), 0.25, 0.25, 0.25, 7.5, 7.5, 7.5, 0.05)
  1204. MagicBlock("Really red", "Neon", CF(Mouse.Hit.p) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), 0.25, 0.25, 0.25, 7.5, 7.5, 7.5, 0.05)
  1205. for i=0, 0.25, 0.1 / Animation_Speed do
  1206. Swait()
  1207. turnto(Mouse.Hit.p)
  1208. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0.05 * Player_Size, 0 * Player_Size, -0.1 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(50)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1209. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-50)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1210. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(160), RAD(0), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  1211. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(10 - 2.5 * COS(SINE / 16)), RAD(0), RAD(-25 + 2.5 * SIN(SINE / 24))) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1212. RightHip.C0 = Clerp(RightHip.C0, CF(0.95 * Player_Size, -1 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(60), RAD(0)) * ANGLES(RAD(-1.25), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1213. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * Player_Size, 0.25 * Player_Size) * ANGLES(RAD(0), RAD(-100), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1214. end
  1215. ATTACK = false
  1216. Rooted = false
  1217. end
  1218.  
  1219. function ChargeShot()
  1220. Rooted = true
  1221. ATTACK = true
  1222. for i=0, 1, 0.1 / Animation_Speed do
  1223. Swait()
  1224. turnto(Mouse.Hit.p)
  1225. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0.05 * Player_Size, 0 * Player_Size, -0.1 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(40)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed/5)
  1226. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-40)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1227. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  1228. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(10 - 2.5 * COS(SINE / 16)), RAD(0), RAD(-25 + 2.5 * SIN(SINE / 24))) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1229. RightHip.C0 = Clerp(RightHip.C0, CF(0.95 * Player_Size, -1 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-1.25), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1230. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * Player_Size, 0.25 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1231. end
  1232. local SIZE = 1
  1233. repeat
  1234. turnto(Mouse.Hit.p)
  1235. MagicSphere("Really red", "Neon", beampart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), 0.25, 0.25, 0.25, SIZE, SIZE, SIZE, 0.05)
  1236. Swait()
  1237. SIZE = SIZE + 0.01
  1238. until KEYHOLD == false
  1239. --local RayHit, RayPos = CastRay(beampart.Position,Mouse.Hit.p,100,Character)
  1240. MagicBlock("Really red", "Neon", beampart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), 0.25, 0.25, 0.25, SIZE*1.5, SIZE*1.5, SIZE*1.5, 0.05)
  1241. CreateSound("379225925", beampart, 3, 1.1)
  1242. local laser = IT("Part",Effects)
  1243. laser.CanCollide = false
  1244. laser.Anchored = true
  1245. local distance = (beampart.Position - Mouse.Hit.p).magnitude
  1246. laser.Size = Vector3.new(SIZE * 0.2, SIZE * 0.2, distance)
  1247. laser.CFrame = CFrame.new(beampart.Position,Mouse.Hit.p) * CFrame.new(0, 0, -distance/2)
  1248. laser.Material = "Neon"
  1249. laser.BrickColor = BRICKC("Really red")
  1250. table.insert(Effects2,{laser,"Disappear",0.05,2,2,2,2})
  1251. AoEDamage(Mouse.Hit.p,SIZE * 5,SIZE*10,SIZE*15,SIZE*5,false,10,2)
  1252. MagicSphere("Really red", "Neon", CF(Mouse.Hit.p) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), 0.25, 0.25, 0.25, SIZE * 7.5, SIZE * 7.5, SIZE * 7.5, 0.05)
  1253. MagicBlock("Really red", "Neon", CF(Mouse.Hit.p) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), 0.25, 0.25, 0.25, SIZE * 7.5, SIZE * 7.5, SIZE * 7.5, 0.05)
  1254. for i=0, 0.25, 0.1 / Animation_Speed do
  1255. Swait()
  1256. turnto(Mouse.Hit.p)
  1257. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0.05 * Player_Size, 0 * Player_Size, -0.1 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(50)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1258. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-50)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1259. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(160), RAD(0), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  1260. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(10 - 2.5 * COS(SINE / 16)), RAD(0), RAD(-25 + 2.5 * SIN(SINE / 24))) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1261. RightHip.C0 = Clerp(RightHip.C0, CF(0.95 * Player_Size, -1 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(60), RAD(0)) * ANGLES(RAD(-1.25), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1262. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * Player_Size, 0.25 * Player_Size) * ANGLES(RAD(0), RAD(-100), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1263. end
  1264. Rooted = false
  1265. ATTACK = false
  1266. end
  1267.  
  1268. function RayCast(Position, Direction, MaxDistance, IgnoreList)
  1269. return game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position, Direction.unit * (MaxDistance or 999.999)), IgnoreList)
  1270. end
  1271.  
  1272. function GroundUp()
  1273. local RayHit, RayPos = RayCast(Mouse.Hit.p, Vector3.new(0, -1, 0), (1), {Character})
  1274. local SpawnPosition = RayPos
  1275. if RayPos then
  1276. Rooted = true
  1277. ATTACK = true
  1278. CreateSound("588697034", RightArm, 2, 0.8)
  1279. for i=0, 1, 0.1 / Animation_Speed/6 do
  1280. Swait()
  1281. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -1 * Player_Size) * ANGLES(RAD(45), RAD(0), RAD(0)), 0.2 / Animation_Speed/8)
  1282. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1283. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 1 * Player_Size, 1 * Player_Size) * ANGLES(RAD(30), RAD(-690), RAD(2 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 24))) * RIGHTSHOULDERC0, 0.15 / Animation_Speed/8)
  1284. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(25), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed/8)
  1285. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed/8)
  1286. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.3 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(5), RAD(0)) * ANGLES(RAD(45), RAD(0), RAD(10)), 0.2 / Animation_Speed/8)
  1287. end
  1288. for i=0, 1, 0.1 / Animation_Speed*2 do
  1289. Swait()
  1290. RootPart.Anchored = true
  1291. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -1 * Player_Size) * ANGLES(RAD(45), RAD(0), RAD(0)), 0.2 / Animation_Speed*3)
  1292. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1293. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 1 * Player_Size, -1.4 * Player_Size) * ANGLES(RAD(30), RAD(-690), RAD(2 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 24))) * RIGHTSHOULDERC0, 0.15 / Animation_Speed*5)
  1294. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(25), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1295. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1296. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.3 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(5), RAD(0)) * ANGLES(RAD(45), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1297. end
  1298. CreateSound("186772924", beampart, 5, 1)
  1299. local floor = IT("Part",Effects)
  1300. floor.Anchored = true
  1301. floor.Size = VT(15,0.2,15)
  1302. floor.Material = "Neon"
  1303. floor.BrickColor = BRICKC("Really red")
  1304. floor.CanCollide = false
  1305. local cyl = Instance.new("CylinderMesh",floor)
  1306. floor.CFrame = CF(beampart.Position.X,beampart.Position.Y-0.2,beampart.Position.Z)
  1307. AoEDamage(floor.Position,25,10,25,15,false,10,5,true)
  1308. local scale = 25
  1309. table.insert(Effects2,{floor,"Block1",0.05,1,0,1,2})
  1310. coroutine.resume(coroutine.create(function()
  1311. repeat
  1312. Swait()
  1313. scale = scale + 5
  1314. AoEDamage(floor.Position,scale,1,2,5,false,10,5,true)
  1315. until floor.Parent == nil
  1316. end))
  1317. end
  1318. ATTACK = false
  1319. Rooted = false
  1320. end
  1321.  
  1322. function fromabove()
  1323. Rooted = true
  1324. ATTACK = true
  1325. for i=0, 1, 0.1 / Animation_Speed do
  1326. Swait()
  1327. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(-20)), 0.15 / Animation_Speed/5)
  1328. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(5 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(15)), 0.15 / Animation_Speed)
  1329. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.75 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(25), RAD(-15)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  1330. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(10 - 2.5 * COS(SINE / 16)), RAD(0), RAD(-25 + 2.5 * SIN(SINE / 24))) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1331. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-2.5)), 0.15 / Animation_Speed)
  1332. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-65), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-15)), 0.15 / Animation_Speed)
  1333. end
  1334. CreateSound("132392101", Head, 10, 1.1)
  1335. Swait(175)
  1336. for i=0, 1, 0.1 / Animation_Speed do
  1337. Swait()
  1338. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0.05 * Player_Size, 0 * Player_Size, -0.1 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(40)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1339. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-40)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1340. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(180), RAD(0), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  1341. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1 * Player_Size, 0.2 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(25), RAD(25), RAD(90)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
  1342. RightHip.C0 = Clerp(RightHip.C0, CF(0.95 * Player_Size, -1 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-1.25), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1343. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * Player_Size, 0.25 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1344. end
  1345. local SIZE = 1
  1346. for i = 1, 70 do
  1347. MagicSphere("Really red", "Neon", beampart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), 0.25, 0.25, 0.25, SIZE, SIZE, SIZE, 0.05)
  1348. Swait()
  1349. SIZE = SIZE + 0.06
  1350. end
  1351. MagicBlock("Really red", "Neon", beampart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), 0.25, 0.25, 0.25, 1.5, 1.5, 1.5, 0.05)
  1352. CreateSound("379225925", beampart, 3, 1.1)
  1353. local laser = IT("Part",Effects)
  1354. laser.CanCollide = false
  1355. laser.Anchored = true
  1356. local distance = (beampart.Position - VT(beampart.Position.X,beampart.Position.Y+1000,beampart.Position.Z)).magnitude
  1357. laser.Size = Vector3.new(0.2, 0.2, distance)
  1358. laser.CFrame = CFrame.new(beampart.Position,VT(beampart.Position.X,beampart.Position.Y+1000,beampart.Position.Z)) * CFrame.new(0, 0, -distance/2)
  1359. laser.Material = "Neon"
  1360. laser.BrickColor = BRICKC("Really red")
  1361. table.insert(Effects2,{laser,"Disappear",0.05,2,2,2,2})
  1362. ATTACK = false
  1363. Rooted = false
  1364. local pos = Mouse.Hit.p
  1365. Swait(10)
  1366. for i = 1, 85 do
  1367. coroutine.resume(coroutine.create(function()
  1368. Swait(math.random(1,100))
  1369. local pos = VT(pos.X+math.random(-15,15),pos.Y,pos.Z+math.random(-15,15))
  1370. local laser = IT("Part",Effects)
  1371. laser.CanCollide = false
  1372. laser.Anchored = true
  1373. local distance = (pos - VT(pos.X,pos.Y+1000,pos.Z)).magnitude
  1374. laser.Size = Vector3.new(0.2, 0.2, distance)
  1375. laser.CFrame = CFrame.new(pos,VT(pos.X,pos.Y+1000,pos.Z)) * CFrame.new(0, 0, -distance/2)
  1376. laser.Material = "Neon"
  1377. laser.BrickColor = BRICKC("Really red")
  1378. MagicSphere("Really red", "Neon", CF(pos) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), 0.25, 0.25, 0.25, 7.5, 7.5, 7.5, 0.05)
  1379. MagicBlock("Really red", "Neon", CF(pos) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), 0.25, 0.25, 0.25, 7.5, 7.5, 7.5, 0.05)
  1380. table.insert(Effects2,{laser,"Disappear",0.05,2,2,2,2})
  1381. AoEDamage(pos,5,15,25,12,false,10,2)
  1382. end))
  1383. end
  1384. end
  1385.  
  1386.  
  1387.  
  1388.  
  1389. --//=================================\\
  1390. --|| ASSIGN THINGS TO KEYS
  1391. --\\=================================//
  1392.  
  1393. Humanoid.Changed:connect(function(Jump)
  1394. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  1395. Humanoid.Jump = false
  1396. end
  1397. end)
  1398.  
  1399. function MouseDown(Mouse)
  1400. if ATTACK == false then
  1401. --HOLD = true
  1402. Shoot()
  1403. end
  1404. end
  1405.  
  1406. function MouseUp(Mouse)
  1407. HOLD = false
  1408. end
  1409.  
  1410. function KeyDown(Key)
  1411. KEYHOLD = true
  1412. if Key == "e" and ATTACK == false then
  1413. ChargeShot()
  1414. end
  1415. if Key == "g" and ATTACK == false then
  1416. GroundUp()
  1417. end
  1418. if Key == "p" then
  1419. if SPRINTING == false then
  1420. SPRINTING = true
  1421. elseif SPRINTING == true then
  1422. SPRINTING = false
  1423. end
  1424. end
  1425. if Key == "x" and ATTACK == false then
  1426. fromabove()
  1427. end
  1428. if Key == "t" and ATTACK == false then
  1429. CreateSound("132392118", Head, 10, 1.1)
  1430. end
  1431. if Key == "g" then
  1432. CreateSound("907332525", Head, 10, 1.1)
  1433. end
  1434. end
  1435.  
  1436. function KeyUp(Key)
  1437. KEYHOLD = false
  1438. end
  1439.  
  1440. Mouse.Button1Down:connect(function(NEWKEY)
  1441. MouseDown(NEWKEY)
  1442. end)
  1443. Mouse.Button1Up:connect(function(NEWKEY)
  1444. MouseUp(NEWKEY)
  1445. end)
  1446. Mouse.KeyDown:connect(function(NEWKEY)
  1447. KeyDown(NEWKEY)
  1448. end)
  1449. Mouse.KeyUp:connect(function(NEWKEY)
  1450. KeyUp(NEWKEY)
  1451. end)
  1452.  
  1453. --//=================================\\
  1454. --\\=================================//
  1455.  
  1456.  
  1457. function unanchor()
  1458. if UNANCHOR == true then
  1459. g = Character:GetChildren()
  1460. for i = 1, #g do
  1461. if g[i].ClassName == "Part" then
  1462. g[i].Anchored = false
  1463. end
  1464. end
  1465. end
  1466. end
  1467.  
  1468. --//=================================\\
  1469. --|| WRAP THE WHOLE SCRIPT UP
  1470. --\\=================================//
  1471.  
  1472. Humanoid.Changed:connect(function(Jump)
  1473. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  1474. Humanoid.Jump = false
  1475. end
  1476. end)
  1477.  
  1478. Rooted = true
  1479. ANIMATE.Parent = nil
  1480. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  1481. IDLEANIMATION:Play()
  1482. Swait(15)
  1483. Rooted = false
  1484.  
  1485. while true do
  1486. Swait()
  1487. SINE = SINE + CHANGE
  1488. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1489. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1490. local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
  1491. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
  1492. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1493. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1494. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.1 * COS(SINE / (WALKSPEEDVALUE / 2)) * Player_Size) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1495. Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1496. 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)
  1497. 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)
  1498. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1499. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1500. Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1501. RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1502. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1503. end
  1504. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1505. ANIM = "Jump"
  1506. if ATTACK == false then
  1507. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1508. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1509. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1510. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1511. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1512. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1513. end
  1514. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1515. ANIM = "Fall"
  1516. if ATTACK == false then
  1517. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1518. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1519. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1520. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1521. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1522. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1523. end
  1524. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1525. ANIM = "Idle"
  1526. if ATTACK == false then
  1527. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(-20)), 0.15 / Animation_Speed)
  1528. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(5 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(15)), 0.15 / Animation_Speed)
  1529. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.75 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(25), RAD(-15)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  1530. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(10 - 2.5 * COS(SINE / 16)), RAD(0), RAD(-25 + 2.5 * SIN(SINE / 24))) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1531. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-2.5)), 0.15 / Animation_Speed)
  1532. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-65), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-15)), 0.15 / Animation_Speed)
  1533. end
  1534. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1535. ANIM = "Walk"
  1536. WALK = WALK + 1 / Animation_Speed
  1537. if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then
  1538. WALK = 0
  1539. if WALKINGANIM == true then
  1540. WALKINGANIM = false
  1541. elseif WALKINGANIM == false then
  1542. WALKINGANIM = true
  1543. end
  1544. end
  1545. --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)
  1546. --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)
  1547. if ATTACK == false and SPRINTING == false then
  1548. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0.05 * COS(SINE / WALKSPEEDVALUE) * Player_Size, 0 * Player_Size, -0.1 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(-40)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1549. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(40)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1550. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.75 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(25), RAD(-15)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  1551. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(10 - 2.5 * COS(SINE / 16)), RAD(0), RAD(-25 + 2.5 * SIN(SINE / 24))) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1552. RightHip.C0 = Clerp(RightHip.C0, CF(0.95 * Player_Size, -1 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(130), RAD(0)) * ANGLES(RAD(-1.25 - 2.5 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1553. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * Player_Size, 0.25 * Player_Size) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-2.5 + 2.5 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1554. elseif ATTACK == false and SPRINTING == true then
  1555. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0.05 * COS(SINE / WALKSPEEDVALUE) * Player_Size, 0 * Player_Size, -0.1 * Player_Size) * ANGLES(RAD(20), RAD(0), RAD(-40)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1556. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(40)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1557. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.75 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(25), RAD(-15)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  1558. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-30 - 2.5 * COS(SINE / 16)), RAD(0), RAD(-25 + 2.5 * SIN(SINE / 24))) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1559. RightHip.C0 = Clerp(RightHip.C0, CF(0.95 * Player_Size, -1 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(130), RAD(0)) * ANGLES(RAD(-1.25 - 2.5 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1560. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * Player_Size, 0.25 * Player_Size) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-2.5 + 2.5 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1561. end
  1562. end
  1563. if #Effects2>0 then
  1564. for e=1,#Effects2 do
  1565. if Effects2[e]~=nil then
  1566. local Thing=Effects2[e]
  1567. if Thing~=nil then
  1568. local Part=Thing[1]
  1569. local Mode=Thing[2]
  1570. local Delay=Thing[3]
  1571. local IncX=Thing[4]
  1572. local IncY=Thing[5]
  1573. local IncZ=Thing[6]
  1574. local Part2=Thing[8]
  1575. if Thing[1].Transparency<=1 then
  1576. if Thing[2]=="Block1" then
  1577. Thing[1].CFrame=Thing[1].CFrame
  1578. Mesh=Thing[1].Mesh
  1579. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1580. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1581. elseif Thing[2]=="Cylinder" then
  1582. Mesh=Thing[1].Mesh
  1583. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1584. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1585. elseif Thing[2]=="Blood" then
  1586. Mesh=Thing[7]
  1587. Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0)
  1588. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1589. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1590. elseif Thing[2]=="Elec" then
  1591. Mesh=Thing[1].Mesh
  1592. Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9])
  1593. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1594. elseif Thing[2]=="Disappear" then
  1595. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1596. end
  1597. else
  1598. Part.Parent=nil
  1599. table.remove(Effects2,e)
  1600. end
  1601. end
  1602. end
  1603. end
  1604. end
  1605. unanchor()
  1606. Humanoid.MaxHealth = "inf"
  1607. Humanoid.Health = "inf"
  1608. if Rooted == false then
  1609. Disable_Jump = false
  1610. Humanoid.WalkSpeed = Speed
  1611. elseif Rooted == true then
  1612. Disable_Jump = true
  1613. Humanoid.WalkSpeed = 0
  1614. end
  1615. if SPRINTING == true then
  1616. Speed = 45
  1617. Humanoid.JumpPower = 100
  1618. elseif SPRINTING == false then
  1619. Speed = 16
  1620. Humanoid.JumpPower = 50
  1621. end
  1622. end
  1623.  
  1624. --//=================================\\
  1625. --\\=================================//
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631. --//====================================================\\--
  1632. --|| END OF SCRIPT
  1633. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement