Advertisement
wowzers

ice cannon

Jun 26th, 2017
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 56.76 KB | None | 0 0
  1. local Player = game.Players.LocalPlayer
  2. local Character = Player.Character
  3. wait(0.016666666666667)
  4. Effects = {}
  5. local Player = game.Players.localPlayer
  6. local Character = Player.Character
  7. local Humanoid = Character.Humanoid
  8. local mouse = Player:GetMouse()
  9. local m = Instance.new("Model", Character)
  10. m.Name = "WeaponModel"
  11. local effect = Instance.new("Model", Character)
  12. effect.Name = "Effect"
  13. local LeftArm = Character["Left Arm"]
  14. local RightArm = Character["Right Arm"]
  15. local LeftLeg = Character["Left Leg"]
  16. local RightLeg = Character["Right Leg"]
  17. local Head = Character.Head
  18. local Torso = Character.Torso
  19. local cam = game.Workspace.CurrentCamera
  20. local RootPart = Character.HumanoidRootPart
  21. local RootJoint = RootPart.RootJoint
  22. local equipped = false
  23. local attack = false
  24. local Anim = "Idle"
  25. local idle = 0
  26. local attacktype = 1
  27. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  28. local velocity = RootPart.Velocity.y
  29. local sine = 0
  30. local change = 1
  31. local mana = 0
  32. local it = Instance.new
  33. vt = Vector3.new
  34. local grabbed = false
  35. local cf = CFrame.new
  36. local mr = math.rad
  37. local angles = CFrame.Angles
  38. local ud = UDim2.new
  39. local c3 = Color3.new
  40. local NeckCF = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  41. Humanoid.Animator:Destroy()
  42. Character.Animate:Destroy()
  43. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  44. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  45. local LHCF = (CFrame.fromEulerAnglesXYZ(0, -1.6, 0))
  46. RSH = nil
  47. RW = Instance.new("Weld")
  48. LW = Instance.new("Weld")
  49. RH = Torso["Right Hip"]
  50. LH = Torso["Left Hip"]
  51. RSH = Torso["Right Shoulder"]
  52. LSH = Torso["Left Shoulder"]
  53. RSH.Parent = nil
  54. LSH.Parent = nil
  55. RW.Name = "RW"
  56. RW.Part0 = Torso
  57. RW.C0 = cf(1.5, 0.5, 0)
  58. RW.C1 = cf(0, 0.5, 0)
  59. RW.Part1 = RightArm
  60. RW.Parent = Torso
  61. LW.Name = "LW"
  62. LW.Part0 = Torso
  63. LW.C0 = cf(-1.5, 0.5, 0)
  64. LW.C1 = cf(0, 0.5, 0)
  65. LW.Part1 = LeftArm
  66. LW.Parent = Torso
  67. clerp = function(a, b, t)
  68.  
  69. return a:lerp(b, t)
  70. end
  71.  
  72. local RbxUtility = LoadLibrary("RbxUtility")
  73. local Create = RbxUtility.Create
  74. RemoveOutlines = function(part)
  75.  
  76. part.TopSurface = 10
  77. end
  78.  
  79. CreatePart = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  80.  
  81. local Part = Create("Part")({Parent = Parent, Reflectance = Reflectance, Transparency = Transparency, CanCollide = false, Locked = true, BrickColor = BrickColor.new(tostring(BColor)), Name = Name, Size = Size, Material = Material})
  82. RemoveOutlines(Part)
  83. return Part
  84. end
  85.  
  86. CreateMesh = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  87.  
  88. local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale})
  89. if Mesh == "SpecialMesh" then
  90. Msh.MeshType = MeshType
  91. Msh.MeshId = MeshId
  92. end
  93. return Msh
  94. end
  95.  
  96. local co1 = 25
  97. local co2 = 0
  98. local co3 = 0
  99. local co4 = 0
  100. local cooldown1 = 0
  101. local cooldown2 = 0
  102. local cooldown3 = 0
  103. local cooldown4 = 0
  104. local maxEnergy = 0
  105. local Energy = 0
  106. local skill1stam = 25
  107. local skill2stam = 0
  108. local skill3stam = 0
  109. local skill4stam = 0
  110. local recovermana = 5
  111. local skillcolorscheme = BrickColor.new("Smokey grey").Color
  112. local scrn = Instance.new("ScreenGui", Player.PlayerGui)
  113. makeframe = function(par, trans, pos, size, color)
  114.  
  115. local frame = Instance.new("Frame", par)
  116. frame.BackgroundTransparency = trans
  117. frame.BorderSizePixel = 0
  118. frame.Position = pos
  119. frame.Size = size
  120. frame.BackgroundColor3 = color
  121. return frame
  122. end
  123.  
  124. makelabel = function(par, text)
  125.  
  126. local label = Instance.new("TextLabel", par)
  127. label.BackgroundTransparency = 1
  128. label.Size = UDim2.new(1, 0, 1, 0)
  129. label.Position = UDim2.new(0, 0, 0, 0)
  130. label.TextColor3 = Color3.new(255, 255, 255)
  131. label.TextStrokeTransparency = 0
  132. label.FontSize = Enum.FontSize.Size32
  133. label.Font = Enum.Font.SourceSansBold
  134. label.BorderSizePixel = 0
  135. label.TextScaled = true
  136. label.Text = text
  137. end
  138.  
  139. framesk1 = makeframe(scrn, 0.5, UDim2.new(0.8, 0, 0.85, 0), UDim2.new(0.16, 0, 0.1, 0), skillcolorscheme)
  140. framesk2 = makeframe(scrn, 0.5, UDim2.new(0.8, 0, 0.74, 0), UDim2.new(0.16, 0, 0.1, 0), skillcolorscheme)
  141. framesk3 = makeframe(scrn, 0.5, UDim2.new(0.8, 0, 0.63, 0), UDim2.new(0.16, 0, 0.1, 0), skillcolorscheme)
  142. framesk4 = makeframe(scrn, 0.5, UDim2.new(0.8, 0, 0.52, 0), UDim2.new(0.16, 0, 0.1, 0), skillcolorscheme)
  143. bar1 = makeframe(framesk1, 0, UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0), skillcolorscheme)
  144. bar2 = makeframe(framesk2, 0, UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0), skillcolorscheme)
  145. bar3 = makeframe(framesk3, 0, UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0), skillcolorscheme)
  146. bar4 = makeframe(framesk4, 0, UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0), skillcolorscheme)
  147. text1 = Instance.new("TextLabel", framesk1)
  148. text1.BackgroundTransparency = 1
  149. text1.Size = UDim2.new(1, 0, 1, 0)
  150. text1.Position = UDim2.new(0, 0, 0, 0)
  151. text1.TextColor3 = Color3.new(255, 255, 255)
  152. text1.TextStrokeTransparency = 0
  153. text1.FontSize = Enum.FontSize.Size18
  154. text1.Font = Enum.Font.SourceSansLight
  155. text1.BorderSizePixel = 0
  156. text1.TextScaled = true
  157. text1.Text = "[Z]\n\tAim"
  158. text2 = Instance.new("TextLabel", framesk2)
  159. text2.BackgroundTransparency = 1
  160. text2.Size = UDim2.new(1, 0, 1, 0)
  161. text2.Position = UDim2.new(0, 0, 0, 0)
  162. text2.TextColor3 = Color3.new(255, 255, 255)
  163. text2.TextStrokeTransparency = 0
  164. text2.FontSize = Enum.FontSize.Size18
  165. text2.Font = Enum.Font.SourceSansLight
  166. text2.BorderSizePixel = 0
  167. text2.TextScaled = true
  168. text2.Text = "[X]\n Explosive Shot"
  169. text3 = Instance.new("TextLabel", framesk3)
  170. text3.BackgroundTransparency = 1
  171. text3.Size = UDim2.new(1, 0, 1, 0)
  172. text3.Position = UDim2.new(0, 0, 0, 0)
  173. text3.TextColor3 = Color3.new(255, 255, 255)
  174. text3.TextStrokeTransparency = 0
  175. text3.FontSize = Enum.FontSize.Size18
  176. text3.Font = Enum.Font.SourceSansLight
  177. text3.BorderSizePixel = 0
  178. text3.TextScaled = false
  179. text3.Text = "[C]\n Shockwave"
  180. text4 = Instance.new("TextLabel", framesk4)
  181. text4.BackgroundTransparency = 1
  182. text4.Size = UDim2.new(1, 0, 1, 0)
  183. text4.Position = UDim2.new(0, 0, 0, 0)
  184. text4.TextColor3 = Color3.new(255, 255, 255)
  185. text4.TextStrokeTransparency = 0
  186. text4.FontSize = Enum.FontSize.Size18
  187. text4.Font = Enum.Font.SourceSansLight
  188. text4.BorderSizePixel = 0
  189. text4.TextScaled = true
  190. text4.Text = "[V]\n Rampage"
  191. ArtificialHB = Instance.new("BindableEvent", Player.PlayerGui)
  192. ArtificialHB.Name = "Heartbeat"
  193. Player.PlayerGui:WaitForChild("Heartbeat")
  194. frame = 0.033333333333333
  195. tf = 0
  196. allowframeloss = false
  197. tossremainder = false
  198. lastframe = tick()
  199. Player.PlayerGui.Heartbeat:Fire()
  200. local gg = false
  201. game:GetService("RunService").Heartbeat:connect(function(s, p)
  202.  
  203. if Player.PlayerGui:FindFirstChild("Heartbeat") == nil then
  204. gg = true
  205. end
  206. if gg == true then
  207. return
  208. end
  209. tf = tf + s
  210. if frame <= tf then
  211. if allowframeloss then
  212. Player.PlayerGui.Heartbeat:Fire()
  213. lastframe = tick()
  214. else
  215. for i = 1, math.floor(tf / frame) do
  216. Player.PlayerGui.Heartbeat:Fire()
  217. end
  218. lastframe = tick()
  219. end
  220. if tossremainder then
  221. tf = 0
  222. else
  223. tf = tf - frame * math.floor(tf / frame)
  224. end
  225. end
  226. end
  227. )
  228. swait = function(num)
  229.  
  230. if num == 0 or num == nil then
  231. ArtificialHB.Event:wait()
  232. else
  233. for i = 0, num do
  234. ArtificialHB.Event:wait()
  235. end
  236. end
  237. end
  238.  
  239. CreateWeld = function(Parent, Part0, Part1, C0, C1)
  240.  
  241. local Weld = Create("Weld")({Parent = Parent, Part0 = Part0, Part1 = Part1, C0 = C0, C1 = C1})
  242. return Weld
  243. end
  244.  
  245. rayCast = function(Position, Direction, Range, Ignore)
  246.  
  247. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  248. end
  249.  
  250. CreateSound = function(id, par, vol, pit)
  251.  
  252. coroutine.resume(coroutine.create(function()
  253.  
  254. local sou = Instance.new("Sound", par or workspace)
  255. sou.Volume = 0.1
  256. sou.Pitch = 1
  257. sou.SoundId = "rbxassetid://357568316"
  258. swait()
  259. sou:play()
  260. game:GetService("Debris"):AddItem(sou, 6)
  261. end
  262. ))
  263. end
  264.  
  265. local getclosest = function(obj, distance)
  266.  
  267. local last, lastx = distance + 1, nil
  268. for i,v in pairs(workspace:GetChildren()) do
  269. if v:IsA("Model") and v ~= Character and v:findFirstChild("Humanoid") and v:findFirstChild("Torso") and v:findFirstChild("Humanoid").Health > 0 then
  270. local t = v.Torso
  271. local dist = (t.Position - obj.Position).magnitude
  272. if dist <= distance and dist < last then
  273. last = dist
  274. lastx = v
  275. end
  276. end
  277. end
  278. return lastx
  279. end
  280.  
  281. Handle = CreatePart(m, Enum.Material.Plastic, 0, 1, "Black", "FakeHandle", Vector3.new(0.210000008, 0.690000117, 0.280000001))
  282. HandleWeld = CreateWeld(m, Character["Right Arm"], Handle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.09519327, -0.237398148, 0.0399169922, 0, -1, 0, 0, 0, -1, 1, 0, 0))
  283. FakeHandle = CreatePart(m, Enum.Material.Plastic, 0, 1, "Black", "FakeHandle", Vector3.new(0.210000008, 0.690000117, 0.280000001))
  284. FakeHandleWeld = CreateWeld(m, Handle, FakeHandle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  285. Motor = CreatePart(m, Enum.Material.SmoothPlastic, 0, 1, "Black", "Motor", Vector3.new(0.50999999, 0.430000126, 0.460000008))
  286. MotorWeld = CreateWeld(m, FakeHandle, Motor, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.565002441, 0, -0.155000687, 0, 1, 0, 0, 0, 1, 1, 0, 0))
  287. CreateMesh("CylinderMesh", Motor, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
  288. Barrel = CreatePart(m, Enum.Material.Plastic, 0, 1, "Really black", "Barrel", Vector3.new(0.200000003, 0.290000021, 0.420000017))
  289. BarrelWeld = CreateWeld(m, Motor, Barrel, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-2.10501862, 1.0033416748, 1.0717830658, 1, 0, 0, 0, -1, 0, 0, 0, -1))
  290. CreateMesh("BlockMesh", Barrel, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
  291. Hitbox = CreatePart(m, Enum.Material.Plastic, 0, 1, "Black", "Hitbox", Vector3.new(8.09000015, 0.200000003, 0.579999983))
  292. HitboxWeld = CreateWeld(m, Motor, Hitbox, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-4.09000206, 0, -0.0749988556, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  293. Guhn = CreatePart(m, Enum.Material.Ice, 0, 0, "Bright blue", "Guhn", Vector3.new(4,1.5,1.5))
  294. GuhnWeld = CreateWeld(m, Handle, Guhn, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, 0, -1, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  295. Part = CreatePart(m, Enum.Material.Plastic, 0, 0, "Black", "Guhn hole thingy", Vector3.new(4,1,1))
  296. Part = CreateWeld(m, Guhn, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.05, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  297. Part2 = CreatePart(m, Enum.Material.Plastic, 0, 0, "Black", "Guhn bar thingy", Vector3.new(.5,1.25,2))
  298. Part2 = CreateWeld(m, Guhn, Part2, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.55, .25, 2, 1, 0, 0, 0, 1, 0, -.75, 0, 1))
  299. Part3 = CreatePart(m, Enum.Material.Plastic, 0, 0, "Black", "Guhn hole thingy", Vector3.new(.5,1.25,2))
  300. Part3 = CreateWeld(m, Guhn, Part3, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(1.5, .25, .5, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  301. Part4 = CreatePart(m, Enum.Material.Plastic, 0, 0, "Black", "Guhn hole thingy", Vector3.new(3,.5,2.1))
  302. Part4 = CreateWeld(m, Guhn, Part4, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.05, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  303. Part5 = CreatePart(m, Enum.Material.Plastic, 0, 0, "Black", "Guhn hole thingy", Vector3.new(3,2.1,.5))
  304. Part5 = CreateWeld(m, Guhn, Part5, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.05, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  305. Damagefunc = function(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  306.  
  307. if hit.Parent == nil then
  308. return
  309. end
  310. local h = hit.Parent:FindFirstChild("Humanoid")
  311. for _,v in pairs(hit.Parent:children()) do
  312. if v:IsA("Humanoid") then
  313. h = v
  314. end
  315. end
  316. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  317. if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
  318. return
  319. end
  320. local c = Create("ObjectValue")({Name = "creator", Value = game:service("Players").LocalPlayer, Parent = h})
  321. game:GetService("Debris"):AddItem(c, 0.5)
  322. if HitSound ~= nil and HitPitch ~= nil then
  323. CreateSound(HitSound, hit, 1, HitPitch)
  324. end
  325. local Damage = math.random(minim, maxim)
  326. local blocked = false
  327. local block = hit.Parent:findFirstChild("Block")
  328. if block ~= nil and block.className == "IntValue" and block.Value > 0 then
  329. blocked = true
  330. block.Value = block.Value - 1
  331. print(block.Value)
  332. end
  333. if blocked == false then
  334. HitHealth = h.Health
  335. h.Health = h.Health - Damage
  336. if HitHealth ~= h.Health and HitHealth ~= 0 and h.Health <= 0 and h.Parent.Name ~= "Hologram" then
  337. print("gained spree")
  338. game.Players.LocalPlayer:FindFirstChild("leaderstats").Spree.Value = game.Players.LocalPlayer.leaderstats.Spree.Value + 1
  339. end
  340. if HitHealth ~= h.Health and HitHealth ~= 0 and h.Health <= 0 then
  341. print("gained kill")
  342. Player.PlayerGui.Kills.Value = Player.PlayerGui.Kills.Value + 1
  343. end
  344. ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
  345. else
  346. h.Health = h.Health - Damage / 2
  347. ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
  348. end
  349. if Type == "Knockdown" then
  350. local hum = hit.Parent.Humanoid
  351. hum.PlatformStand = true
  352. coroutine.resume(coroutine.create(function(HHumanoid)
  353.  
  354. swait(1)
  355. HHumanoid.PlatformStand = false
  356. end
  357. ), hum)
  358. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  359. local bodvol = Create("BodyVelocity")({velocity = angle * knockback, P = 5000, maxForce = Vector3.new(8000, 8000, 8000), Parent = hit})
  360. local rl = Create("BodyAngularVelocity")({P = 3000, maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), Parent = hit})
  361. game:GetService("Debris"):AddItem(bodvol, 0.5)
  362. game:GetService("Debris"):AddItem(rl, 0.5)
  363. elseif Type == "Normal" then
  364. local vp = Create("BodyVelocity")({P = 500, maxForce = Vector3.new(math.huge, 0, math.huge), velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05})
  365. if knockback > 0 then
  366. vp.Parent = hit.Parent.Torso
  367. end
  368. game:GetService("Debris"):AddItem(vp, 0.5)
  369. elseif Type == "Up" then
  370. local bodyVelocity = Create("BodyVelocity")({velocity = vt(0, 20, 0), P = 5000, maxForce = Vector3.new(8000, 8000, 8000), Parent = hit})
  371. game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
  372. elseif Type == "DarkUp" then
  373. coroutine.resume(coroutine.create(function()
  374.  
  375. for i = 0, 1, 0.1 do
  376. swait()
  377. BlockEffect(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, 0.08, 1)
  378. end
  379. end
  380. ))
  381. local bodyVelocity = Create("BodyVelocity")({velocity = vt(0, 20, 0), P = 5000, maxForce = Vector3.new(8000, 8000, 8000), Parent = hit})
  382. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  383. elseif Type == "Snare" then
  384. local bp = Create("BodyPosition")({P = 2000, D = 100, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Torso.Position, Parent = hit.Parent.Torso})
  385. game:GetService("Debris"):AddItem(bp, 0.5)
  386. elseif Type == "Freeze" then
  387. local BodPos = Create("BodyPosition")({P = 50000, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Torso.Position, Parent = hit.Parent.Torso})
  388. local BodGy = Create("BodyGyro")({maxTorque = Vector3.new(400000, 400000, 400000) * math.huge, P = 20000, Parent = hit.Parent.Torso, cframe = hit.Parent.Torso.CFrame})
  389. hit.Parent.Torso.Anchored = true
  390. coroutine.resume(coroutine.create(function(Part)
  391.  
  392. swait(1.5)
  393. Part.Anchored = false
  394. end
  395. ), hit.Parent.Torso)
  396. game:GetService("Debris"):AddItem(BodPos, 3)
  397. game:GetService("Debris"):AddItem(BodGy, 3)
  398.  
  399.  
  400. end
  401. local debounce = Create("BoolValue")({Name = "DebounceHit", Parent = hit.Parent, Value = true})
  402. game:GetService("Debris"):AddItem(debounce, Delay)
  403. c = Instance.new("ObjectValue")
  404. c.Name = "creator"
  405. c.Value = Player
  406. c.Parent = h
  407. game:GetService("Debris"):AddItem(c, 0.5)
  408. end
  409. end
  410.  
  411. ShowDamage = function(Pos, Text, Time, Color)
  412.  
  413. local Rate = 0.033333333333333
  414. if not Pos then
  415. local Pos = Vector3.new(0, 0, 0)
  416. end
  417. local Text = Text or ""
  418. local Time = Time or 2
  419. if not Color then
  420. local Color = Color3.new(1, 0, 1)
  421. end
  422. local EffectPart = CreatePart(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", vt(0, 0, 0))
  423. EffectPart.Anchored = true
  424. local BillboardGui = Create("BillboardGui")({Size = UDim2.new(3, 0, 3, 0), Adornee = EffectPart, Parent = EffectPart})
  425. local TextLabel = Create("TextLabel")({BackgroundTransparency = 1, Size = UDim2.new(1, 0, 1, 0), Text = Text, TextColor3 = Color, TextScaled = true, Font = Enum.Font.ArialBold, Parent = BillboardGui})
  426. game.Debris:AddItem(EffectPart, Time + 0.1)
  427. EffectPart.Parent = game:GetService("Workspace")
  428. delay(0, function()
  429.  
  430. local Frames = Time / Rate
  431. for Frame = 1, Frames do
  432. wait(Rate)
  433. local Percent = Frame / Frames
  434. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  435. TextLabel.TextTransparency = Percent
  436. end
  437. if EffectPart and EffectPart.Parent then
  438. EffectPart:Destroy()
  439. end
  440. end
  441. )
  442. end
  443.  
  444. MagniDamage = function(Part, magni, mindam, maxdam, knock, Type)
  445.  
  446. for _,c in pairs(workspace:children()) do
  447. local hum = c:findFirstChild("Humanoid")
  448. if hum ~= nil then
  449. local head = c:findFirstChild("Torso")
  450. if head ~= nil then
  451. local targ = head.Position - Part.Position
  452. local mag = targ.magnitude
  453. if mag <= magni and c.Name ~= Player.Name then
  454. Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "http://www.roblox.com/asset/?id=231917784", 1)
  455. end
  456. end
  457. end
  458. end
  459. end
  460.  
  461. BlockEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  462.  
  463. local prt = CreatePart(effect, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  464. prt.Anchored = true
  465. prt.CFrame = cframe
  466. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  467. game:GetService("Debris"):AddItem(prt, 10)
  468. if Type == 1 or Type == nil then
  469. table.insert(Effects, {prt, "Block1", delay, x3, y3, z3, msh})
  470. else
  471. if Type == 2 then
  472. table.insert(Effects, {prt, "Block2", delay, x3, y3, z3, msh})
  473. end
  474. end
  475. end
  476.  
  477. SphereEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  478.  
  479. local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  480. prt.Anchored = true
  481. prt.CFrame = cframe
  482. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  483. game:GetService("Debris"):AddItem(prt, 10)
  484. table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
  485. end
  486.  
  487. RingEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  488.  
  489. local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  490. prt.Anchored = true
  491. prt.CFrame = cframe * CFrame.new(x1, y1, z1)
  492. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  493. game:GetService("Debris"):AddItem(prt, 10)
  494. table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
  495. end
  496.  
  497. CylinderEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  498.  
  499. local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  500. prt.Anchored = true
  501. prt.CFrame = cframe
  502. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  503. game:GetService("Debris"):AddItem(prt, 10)
  504. table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
  505. end
  506.  
  507. WaveEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  508.  
  509. local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  510. prt.Anchored = true
  511. prt.CFrame = cframe
  512. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  513. game:GetService("Debris"):AddItem(prt, 10)
  514. table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
  515. end
  516.  
  517. SpecialEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  518.  
  519. local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  520. prt.Anchored = true
  521. prt.CFrame = cframe
  522. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  523. game:GetService("Debris"):AddItem(prt, 10)
  524. table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
  525. end
  526.  
  527. BreakEffect = function(brickcolor, cframe, x1, y1, z1)
  528.  
  529. local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  530. prt.Anchored = true
  531. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  532. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  533. local num = math.random(10, 50) / 1000
  534. game:GetService("Debris"):AddItem(prt, 10)
  535. table.insert(Effects, {prt, "Shatter", num, prt.CFrame, math.random() - math.random(), 0, math.random(50, 100) / 100})
  536. end
  537.  
  538. CloudEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  539.  
  540. local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  541. prt.Anchored = true
  542. prt.CFrame = cframe
  543. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://1095708", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  544. game:GetService("Debris"):AddItem(prt, 10)
  545. table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
  546. end
  547.  
  548. Laser = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  549.  
  550. local prt = CreatePart(effect, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  551. prt.Anchored = true
  552. prt.CFrame = cframe
  553. prt.Material = "Neon"
  554. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  555. game:GetService("Debris"):AddItem(prt, 10)
  556. coroutine.resume(coroutine.create(function(Part, Mesh)
  557.  
  558. for i = 0, 1, delay do
  559. swait()
  560. Part.Transparency = i
  561. Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3)
  562. end
  563. Part.Parent = nil
  564. end
  565. ), prt, msh)
  566. end
  567.  
  568. shoottraildd = function(mouse, partt, SpreadAmount, multiply, Type)
  569.  
  570. local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount))
  571. local MainPos = partt.Position
  572. local MainPos2 = mouse.Hit.p + SpreadVectors
  573. local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2)
  574. local speed = 10
  575. local num = 10
  576. coroutine.resume(coroutine.create(function()
  577.  
  578. repeat
  579. swait()
  580. local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent)
  581. local mag = (MainPos - pos).magnitude
  582. if Type == "Explosive" then
  583. Laser(BrickColor.new("Pastel Blue"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -0.175, 0, -0.175, 0.15)
  584. else
  585. if Type == "Poison" then
  586. Laser(BrickColor.new("Bright violet"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -0.175, 0, -0.175, 0.15)
  587. SphereEffect(BrickColor.new("Bright violet"), CFrame.new((MainPos + pos) / 2, pos), 1, 1, 1, 2, 2, 2, 0.07)
  588. else
  589. if Type == "Stun" then
  590. Laser(BrickColor.new("White"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -0.175, 0, -0.175, 0.15)
  591. end
  592. end
  593. end
  594. MainPos = MainPos + MouseLook.lookVector * speed
  595. num = num - 1
  596. MouseLook = MouseLook * angles(math.rad(-1), 0, 0)
  597. if hit ~= nil then
  598. num = 0
  599. local refpart = CreatePart(effect, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
  600. refpart.Anchored = true
  601. refpart.CFrame = CFrame.new(pos)
  602. game:GetService("Debris"):AddItem(refpart, 2)
  603. end
  604. do
  605. if num <= 0 then
  606. local refpart = CreatePart(effect, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
  607. refpart.Anchored = true
  608. refpart.CFrame = CFrame.new(pos)
  609. if hit ~= nil then
  610. if Type == "Explosive" then
  611. CreateSound("rbxassetid://181004943", refpart, 1, 1)
  612. BlockEffect(BrickColor.new("Really blue"), refpart.CFrame, 1, 1, 1, 10, 10, 10, 0.05)
  613. BlockEffect(BrickColor.new("Institutional white"), refpart.CFrame, 1, 1, 1, 10, 10, 10, 0.07)
  614. MagniDamage(refpart, 5, 10 * multiply, 10 * multiply, 0, "Freeze")
  615. else
  616. if Type == "Poison" then
  617. if hit.Name == "memes" then
  618. SphereEffect(BrickColor.new("Bright violet"), refpart.CFrame, 1, 1, 1, 1, 1, 1, 0.07)
  619. MagniDamage(refpart, 5, 18 * multiply, 20 * multiply, 0, "Curse")
  620. else
  621. SphereEffect(BrickColor.new("Bright violet"), refpart.CFrame, 1, 1, 1, 1, 1, 1, 0.07)
  622. MagniDamage(refpart, 5, 3 * multiply, 4 * multiply, 0, "Curse")
  623. for i = 0,100,5 do
  624. hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health-1
  625. hit.Parent.Humanoid.WalkSpeed = 5
  626. swait(.5)
  627. hit.Parent.Humanoid.WalkSpeed = 16
  628. end
  629. end
  630. else
  631. if Type == "Stun" then
  632. BlockEffect(BrickColor.new("White"), refpart.CFrame, 1, 1, 1, 1, 1, 1, 0.07)
  633. MagniDamage(refpart, 5, -10 * multiply, -5 * multiply, 0, "Normal")
  634. for i = 0,100,5 do
  635. hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health+2
  636. hit.Parent.Humanoid.WalkSpeed = 16
  637. swait(.5)
  638. end
  639. end
  640. end
  641. end
  642. end
  643. game:GetService("Debris"):AddItem(refpart, 0)
  644. end
  645. end
  646. until num <= 0
  647. end
  648. ))
  649. end
  650.  
  651. shoottrail = function(mouse, partt, SpreadAmount, multiply)
  652.  
  653. local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount))
  654. local MainPos = partt.Position
  655. local MainPos2 = mouse.Hit.p + SpreadVectors
  656. local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2)
  657. local speed = 10
  658. local num = 10
  659. CreateSound("rbxassetid://256172142", partt, 1, 1)
  660. coroutine.resume(coroutine.create(function()
  661.  
  662. repeat
  663. swait()
  664. local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent)
  665. local mag = (MainPos - pos).magnitude
  666. Laser(BrickColor.new("Institutional white"), CFrame.new((MainPos + pos) / 2, pos) * angles(3.14, 0, 0), 2, mag *(speed * (speed / 2)), 1, -0.5, 0, -0.5, 0.15)
  667. MainPos = MainPos + MouseLook.lookVector * speed
  668. num = num - 1
  669. MouseLook = MouseLook * angles(math.rad(-1), 0, 0)
  670. if hit ~= nil then
  671. num = 0
  672. local refpart = CreatePart(effect, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
  673. refpart.Anchored = true
  674. refpart.CFrame = CFrame.new(pos)
  675. game:GetService("Debris"):AddItem(refpart, 2)
  676. end
  677. do
  678. if num <= 0 then
  679. local refpart = CreatePart(effect, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
  680. refpart.Anchored = true
  681. refpart.CFrame = CFrame.new(pos)
  682. if hit ~= nil then
  683. MagniDamage(refpart, 5, 5 * multiply, 15 * multiply, 0, "Normal")
  684. end
  685. game:GetService("Debris"):AddItem(refpart, 0)
  686. end
  687. end
  688. until num <= 0
  689. end
  690. ))
  691. end
  692.  
  693. attackone = function()
  694.  
  695. attack = true
  696. local con = Hitbox.Touched:connect(function(hit)
  697.  
  698. Damagefunc(Hitbox, hit, 10, 15, math.random(1, 5), "Normal", RootPart, 0.2, "rbxassetid://199149221", 0.8)
  699. end
  700. )
  701. for i = 0, 1, 0.2 do
  702. swait()
  703. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(40)), 0.3)
  704. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(-40)), 0.3)
  705. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(90), math.rad(90)), 0.3)
  706. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(0), math.rad(0), math.rad(-30)), 0.3)
  707. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  708. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  709. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  710. end
  711. CreateSound("http://www.roblox.com/asset/?id=169285411", RootPart, 1, 1)
  712. for i = 0, 1, 0.1 do
  713. swait()
  714. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-80)), 0.3)
  715. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(80)), 0.3)
  716. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.3)
  717. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.3)
  718. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  719. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  720. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  721. end
  722. con:disconnect()
  723. attack = false
  724. end
  725.  
  726. attacktwo = function()
  727.  
  728. attack = true
  729. local con = Hitbox.Touched:connect(function(hit)
  730.  
  731. Damagefunc(Hitbox, hit, 10, 15, math.random(1, 5), "Normal", RootPart, 0.2, "rbxassetid://199149221", 0.8)
  732. end
  733. )
  734. for i = 0, 1, 0.2 do
  735. swait()
  736. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-90)), 0.3)
  737. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(90)), 0.3)
  738. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.3)
  739. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.3)
  740. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  741. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  742. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(-180), math.rad(0), math.rad(0)), 0.3)
  743. end
  744. CreateSound("http://www.roblox.com/asset/?id=169285411", RootPart, 1, 0.8)
  745. for i = 0, 1, 0.1 do
  746. swait()
  747. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(80)), 0.3)
  748. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(-10), math.rad(-80)), 0.3)
  749. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(90), math.rad(90)), 0.3)
  750. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.3)
  751. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  752. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  753. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(-180), math.rad(0), math.rad(0)), 0.3)
  754. end
  755. con:disconnect()
  756. attack = false
  757. end
  758.  
  759. attackthree = function()
  760. attack = true
  761. for i = 0, 9, 1 do
  762. MagniDamage(Barrel, 0, 0, 0, 0, "Normal")
  763. shoottraildd(mouse, Barrel, 3, 0.7, "Explosive")
  764. BlockEffect(BrickColor.new("Pastel Blue"), Barrel.CFrame, 5, 5, 5, 5,5,5, 0.07)
  765. BlockEffect(BrickColor.new("Pastel Blue"), Barrel.CFrame, 5, 5, 5, 5, 5, 5, 0.07)
  766. swait(1)
  767. end
  768. attack = false
  769. end
  770.  
  771. yatata = function()
  772.  
  773. attack = true
  774. local con = Hitbox.Touched:connect(function(hit)
  775.  
  776. Damagefunc(Hitbox, hit, 10, 15, math.random(1, 5), "Normal", RootPart, 0.2, "rbxassetid://199149221", 0.8)
  777. end
  778. )
  779. for i = 0, 1, 0.2 do
  780. swait()
  781. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-90)), 0.3)
  782. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(90)), 0.3)
  783. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.3)
  784. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.3)
  785. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  786. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  787. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(-180), math.rad(0), math.rad(0)), 0.3)
  788. end
  789. for i = 1, 5 do
  790. Torso.Velocity = RootPart.CFrame.lookVector * 30
  791. for i = 0, 1, 0.2 do
  792. swait()
  793. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-80)), 0.3)
  794. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(80)), 0.3)
  795. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.3)
  796. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.3)
  797. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  798. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  799. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(-180), math.rad(0), math.rad(0)), 0.3)
  800. end
  801. CreateSound("http://www.roblox.com/asset/?id=440145223", RootPart, 1, 0.7)
  802. CreateSound("http://www.roblox.com/asset/?id=169285411", RootPart, 1, 1)
  803. MagniDamage(Barrel, 8, 8, 15, 0, "Normal")
  804. Torso.Velocity = RootPart.CFrame.lookVector * 30
  805. BlockEffect(BrickColor.new("Br. yellowish orange"), Barrel.CFrame, 5, 5, 5, 3, 3, 3, 0.07)
  806. BlockEffect(BrickColor.new("Pastel Blue"), Barrel.CFrame, 5, 5, 5, 3, 3, 3, 0.07)
  807. for i = 0, 1, 0.2 do
  808. swait()
  809. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(80)), 0.3)
  810. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(-10), math.rad(-80)), 0.3)
  811. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(90), math.rad(90)), 0.3)
  812. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.3)
  813. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  814. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  815. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(-180), math.rad(0), math.rad(0)), 0.3)
  816. end
  817. CreateSound("http://www.roblox.com/asset/?id=440145223", RootPart, 1, 0.7)
  818. MagniDamage(Barrel, 8, 8, 15, 0, "Normal")
  819. Torso.Velocity = RootPart.CFrame.lookVector * 30
  820. BlockEffect(BrickColor.new("Br. yellowish orange"), Barrel.CFrame, 5, 5, 5, 3, 3, 3, 0.07)
  821. BlockEffect(BrickColor.new("Pastel Blue"), Barrel.CFrame, 5, 5, 5, 3, 3, 3, 0.07)
  822. for i = 0, 1, 0.2 do
  823. swait()
  824. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(80)), 0.3)
  825. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(-10), math.rad(-80)), 0.3)
  826. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(90), math.rad(90)), 0.3)
  827. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.3)
  828. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  829. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  830. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  831. end
  832. CreateSound("http://www.roblox.com/asset/?id=440145223", RootPart, 1, 0.7)
  833. CreateSound("http://www.roblox.com/asset/?id=169285411", RootPart, 1, 0.9)
  834. MagniDamage(Barrel, 8, 8, 15, 0, "Normal")
  835. Torso.Velocity = RootPart.CFrame.lookVector * 30
  836. BlockEffect(BrickColor.new("Br. yellowish orange"), Barrel.CFrame, 5, 5, 5, 3, 3, 3, 0.07)
  837. BlockEffect(BrickColor.new("Pastel Blue"), Barrel.CFrame, 5, 5, 5, 3, 3, 3, 0.07)
  838. for i = 0, 1, 0.2 do
  839. swait()
  840. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-80)), 0.3)
  841. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(80)), 0.3)
  842. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.3)
  843. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.3)
  844. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  845. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  846. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  847. end
  848. CreateSound("http://www.roblox.com/asset/?id=440145223", RootPart, 1, 0.7)
  849. MagniDamage(Barrel, 8, 8, 15, 0, "Normal")
  850. Torso.Velocity = RootPart.CFrame.lookVector * 30
  851. BlockEffect(BrickColor.new("Br. yellowish orange"), Barrel.CFrame, 5, 5, 5, 3, 3, 3, 0.07)
  852. BlockEffect(BrickColor.new("Pastel Blue"), Barrel.CFrame, 5, 5, 5, 3, 3, 3, 0.07)
  853. end
  854. con:disconnect()
  855. attack = false
  856. end
  857.  
  858. Grenade = function()
  859.  
  860. attack = true
  861. CreateSound("http://www.roblox.com/asset/?id=134626404", Barrel, 1, 1.6)
  862. shoottraildd(mouse, Barrel, 0, 1, "Poison")
  863. BlockEffect(BrickColor.new("Alder"), Barrel.CFrame, 5, 5, 5, 5,5,5, 0.07)
  864. BlockEffect(BrickColor.new("Alder"), Barrel.CFrame, 5, 5, 5, 5,5,5, 0.07)
  865. BlockEffect(BrickColor.new("Royal purple"), Barrel.CFrame, 5, 5, 5, 14,1,1, 0.07)
  866. Humanoid.AutoRotate = true
  867. attack = false
  868. end
  869. Grenade2 = function()
  870.  
  871. attack = true
  872. CreateSound("rbxassetid://260421433", Guhn, 1, 1.6)
  873. shoottraildd(mouse, Barrel, 0, 1, "Stun")
  874. BlockEffect(BrickColor.new("Shamrock"), Barrel.CFrame, 5, 5, 5, 5,5,5, 0.07)
  875. BlockEffect(BrickColor.new("Shamrock"), Barrel.CFrame, 5, 5, 5, 5,5,5, 0.07)
  876. BlockEffect(BrickColor.new("Lime green"), Barrel.CFrame, 5, 5, 5, 14,1,1, 0.07)
  877. Humanoid.AutoRotate = true
  878. attack = false
  879. end
  880.  
  881. Quake = function()
  882.  
  883. attack = true
  884. for i = 0, 1, 0.2 do
  885. swait()
  886. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-90)), 0.3)
  887. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(90)), 0.3)
  888. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(180), math.rad(0), math.rad(0)), 0.3)
  889. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.3)
  890. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  891. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  892. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  893. end
  894. CreateSound("http://www.roblox.com/asset/?id=169285411", RootPart, 1, 1.3)
  895. for i = 0, 1, 0.2 do
  896. swait()
  897. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-90)), 0.3)
  898. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(90)), 0.3)
  899. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(180), math.rad(0), math.rad(0)), 0.3)
  900. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.3)
  901. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  902. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  903. MotorWeld.C0 = clerp(MotorWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)), 0.3)
  904. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  905. end
  906. CreateSound("http://www.roblox.com/asset/?id=169285411", RootPart, 1, 1.1)
  907. for i = 0, 1, 0.05 do
  908. swait()
  909. BlockEffect(BrickColor.new("Pastel Blue"), Barrel.CFrame, 5, 5, 5, 1, 1, 1, 0.07)
  910. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-90)), 0.3)
  911. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(20), math.rad(90)), 0.3)
  912. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.5) * angles(math.rad(90), math.rad(20), math.rad(-90)), 0.3)
  913. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(90), math.rad(40), math.rad(-70)), 0.3)
  914. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  915. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  916. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)), 0.3)
  917. end
  918. CreateSound("http://www.roblox.com/asset/?id=134626404", RootPart, 1, 1)
  919. MagniDamage(Barrel, 15, 10, 15, 0, "Knockdown")
  920. BlockEffect(BrickColor.new("Br. yellowish orange"), Barrel.CFrame, 5, 5, 5, 5, 5, 5, 0.07)
  921. BlockEffect(BrickColor.new("Pastel Blue"), Barrel.CFrame, 5, 5, 5, 5, 5, 5, 0.03)
  922. RingEffect(BrickColor.new("White"), RootPart.CFrame * cf(0, -2, -10) * angles(1.57, 0, 0), 3, 3, 1, 5, 5, 0, 0.07)
  923. CloudEffect(BrickColor.new("Smokey grey"), RootPart.CFrame * cf(0, -2, -10), 1, 3, 1, 0.3, 1, 0.3, 0.01)
  924. for i = 0, 1, 0.1 do
  925. swait()
  926. Torso.Velocity = RootPart.CFrame.lookVector * -20
  927. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-90)), 0.3)
  928. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(10), math.rad(90)), 0.3)
  929. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.5) * angles(math.rad(90), math.rad(-20), math.rad(-90)), 0.3)
  930. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(90), math.rad(40), math.rad(-70)), 0.3)
  931. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  932. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  933. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)), 0.3)
  934. end
  935. attack = false
  936. end
  937.  
  938. local aiming = false
  939. Aim = function()
  940.  
  941. attack = true
  942. aiming = true
  943. Humanoid.JumpPower = 50
  944. Humanoid.WalkSpeed = 16
  945. Humanoid.AutoRotate = false
  946. for i = 0, 1, 0.1 do
  947. swait()
  948. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-90)), 0.3)
  949. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(10), math.rad(90)), 0.3)
  950. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.3)
  951. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.3, 0) * angles(math.rad(90), math.rad(0), math.rad(-70)), 0.3)
  952. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  953. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  954. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)), 0.3)
  955. end
  956. end
  957.  
  958. local bang = false
  959. shoot = function()
  960.  
  961. bang = true
  962. for i = 0, 9, 1 do
  963. BlockEffect(BrickColor.new("Institutional white"), Barrel.CFrame, 5, 5, 5, 10, 10, 10, 0.07)
  964. BlockEffect(BrickColor.new("Pastel Blue"), Barrel.CFrame, 5, 5, 5, 10, 10, 10, 0.07)
  965. swait(2.5)
  966. end
  967. for i = 0, 9, 1 do
  968. for i = 0, 9, 1 do
  969. shoottrail(mouse, Barrel, 15, 1.5)
  970. end
  971. swait(7.5)
  972. end
  973. for i = 0, 1, 0.1 do
  974. swait()
  975. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-90)), 0.3)
  976. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(90)), 0.3)
  977. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.5) * angles(math.rad(90), math.rad(-20), math.rad(-90)), 0.3)
  978. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.3, 0) * angles(math.rad(90), math.rad(0), math.rad(-70)), 0.3)
  979. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  980. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  981. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)), 0.3)
  982. end
  983. for i = 0, 1, 0.1 do
  984. swait()
  985. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-90)), 0.3)
  986. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(10), math.rad(90)), 0.3)
  987. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.3)
  988. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.3, 0) * angles(math.rad(0), math.rad(0), math.rad(-70)), 0.3)
  989. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  990. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  991. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)), 0.3)
  992. end
  993. bang = false
  994. end
  995.  
  996. mouse.Button1Down:connect(function()
  997.  
  998. if attack == false and attacktype == 1 and aiming == false then
  999. attacktype = 1
  1000. attackthree()
  1001. else
  1002. if attack == false and attacktype == 2 and aiming == false then
  1003. attacktype = 3
  1004. attacktwo()
  1005. else
  1006. if attack == false and attacktype == 3 and aiming == false then
  1007. attacktype = 1
  1008. attackthree()
  1009. end
  1010. end
  1011. end
  1012. if attack == true and aiming == true and bang == false then
  1013. if cooldown1 >= 0 then
  1014. cooldown1 = cooldown1 - 2
  1015. shoot()
  1016. else
  1017. Humanoid.JumpPower = 50
  1018. Humanoid.WalkSpeed = 16
  1019. Humanoid.AutoRotate = true
  1020. attack = false
  1021. aiming = false
  1022. end
  1023. end
  1024. end
  1025. )
  1026. mouse.KeyDown:connect(function(k)
  1027.  
  1028. k = k:lower()
  1029. if attack == false and k == "z" and aiming == false then
  1030. Aim()
  1031. else
  1032. if attack == true and k == "z" and aiming == true then
  1033. Humanoid.WalkSpeed = 16
  1034. Humanoid.JumpPower = 50
  1035. Humanoid.AutoRotate = true
  1036. attack = false
  1037. aiming = false
  1038. else
  1039. if attack == false and co2 <= cooldown2 and k == "x" then
  1040. cooldown2 = 0
  1041. Grenade()
  1042. else
  1043. if attack == false and co3 <= cooldown3 and k == "c" then
  1044. cooldown3 = 0
  1045. Grenade2()
  1046. else
  1047. if attack == false and co4 <= cooldown4 and k == "v" then
  1048. cooldown4 = 0
  1049. yatata()
  1050. end
  1051. end
  1052. end
  1053. end
  1054. end
  1055. end
  1056. )
  1057. updateskills = function()
  1058.  
  1059. if cooldown1 <= co1 and aiming == false then
  1060. cooldown1 = cooldown1 + 0.033333333333333
  1061. end
  1062. if cooldown2 <= co2 then
  1063. cooldown2 = cooldown2 + 0.033333333333333
  1064. end
  1065. if cooldown3 <= co3 then
  1066. cooldown3 = cooldown3 + 0.033333333333333
  1067. end
  1068. if cooldown4 <= co4 then
  1069. cooldown4 = cooldown4 + 0.033333333333333
  1070. end
  1071. end
  1072.  
  1073. while true do
  1074. swait()
  1075. if aiming == true then
  1076. local aim = CFrame.new(RootPart.Position, mouse.Hit.p)
  1077. local direction = aim.lookVector
  1078. local headingA = math.atan2(direction.x, direction.z)
  1079. headingA = math.deg(headingA)
  1080. Humanoid.AutoRotate = false
  1081. RootPart.CFrame = CFrame.new(RootPart.Position) * angles(math.rad(0), math.rad(headingA - 180), math.rad(0))
  1082. else
  1083. do
  1084. Humanoid.AutoRotate = true
  1085. updateskills()
  1086. bar4:TweenSize(UDim2.new(1 * (cooldown4 / co4), 0, 1, 0), "Out", "Quad", 0.5)
  1087. bar3:TweenSize(UDim2.new(1 * (cooldown3 / co3), 0, 1, 0), "Out", "Quad", 0.5)
  1088. bar1:TweenSize(UDim2.new(1 * (cooldown1 / co1), 0, 1, 0), "Out", "Quad", 0.5)
  1089. bar2:TweenSize(UDim2.new(1 * (cooldown2 / co2), 0, 1, 0), "Out", "Quad", 0.5)
  1090. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1091. velocity = RootPart.Velocity.y
  1092. sine = sine + change
  1093. local hit, pos = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  1094. if equipped == true or equipped == false then
  1095. if 10000 < RootPart.Velocity.y and hit == nil then
  1096. Anim = "Jump"
  1097. if attack == false then
  1098. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos((sine) / 20)) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1099. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-20), math.rad(0), math.rad(0)), 0.3)
  1100. RW.C0 = clerp(RW.C0, CFrame.new(1.6, 0.5, -0.4) * angles(math.rad(240), math.rad(0), math.rad(-30 + 5 * math.cos((sine) / 15))), 0.3)
  1101. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos((sine) / 25), 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1102. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos((sine) / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1103. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos((sine) / 20), 0) * LHCF * angles(math.rad(0), math.rad(0), math.rad(30)), 0.3)
  1104. MotorWeld.C0 = clerp(MotorWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1105. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, -0.3, -0.2) * angles(math.rad(0), math.rad(50), math.rad(-60 - 0.5 * math.cos((sine) / 25))), 0.3)
  1106. end
  1107. else
  1108. if RootPart.Velocity.y < -10000000 and hit == nil then
  1109. Anim = "Fall"
  1110. if attack == false then
  1111. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos((sine) / 20)) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1112. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(20), math.rad(0), math.rad(0)), 0.3)
  1113. RW.C0 = clerp(RW.C0, CFrame.new(1.6, 0.5, -0.4) * angles(math.rad(240), math.rad(0), math.rad(-30 + 5 * math.cos((sine) / 15))), 0.3)
  1114. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos((sine) / 25), 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1115. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos((sine) / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1116. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos((sine) / 20), 0) * LHCF * angles(math.rad(0), math.rad(0), math.rad(30)), 0.3)
  1117. MotorWeld.C0 = clerp(MotorWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1118. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, -0.3, -0.2) * angles(math.rad(0), math.rad(50), math.rad(-60 - 0.5 * math.cos((sine) / 25))), 0.3)
  1119. end
  1120. else
  1121. if Torsovelocity < 1 and hit ~= nil then
  1122. Anim = "Idle"
  1123. if attack == false then
  1124. change = 1
  1125. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-90)), 0.3)
  1126. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(10), math.rad(90)), 0.3)
  1127. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.3)
  1128. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(90), math.rad(0), math.rad(-70)), 0.3)
  1129. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1130. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  1131. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)), 0.3)
  1132. end
  1133. else
  1134. if 20000000 < Torsovelocity and hit ~= nil then
  1135. Anim = "Walk"
  1136. if attack == false then
  1137. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(-90)), 0.3)
  1138. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(10), math.rad(90)), 0.3)
  1139. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.3)
  1140. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(90), math.rad(0), math.rad(-70)), 0.3)
  1141. RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1142. LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(20), math.rad(0)), 0.3)
  1143. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)), 0.3)
  1144. end
  1145. end
  1146. end
  1147. end
  1148. end
  1149. end
  1150. end
  1151. if 0 < #Effects then
  1152. for e = 1, #Effects do
  1153. if Effects[e] ~= nil then
  1154. local Thing = Effects[e]
  1155. if Thing ~= nil then
  1156. local Part = Thing[1]
  1157. local Mode = Thing[2]
  1158. local Delay = Thing[3]
  1159. local IncX = Thing[4]
  1160. local IncY = Thing[5]
  1161. local IncZ = Thing[6]
  1162. if Thing[1].Transparency <= 1 then
  1163. if Thing[2] == "Block1" then
  1164. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1165. Mesh = Thing[1].Mesh
  1166. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1167. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1168. else
  1169. if Thing[2] == "Block2" then
  1170. Thing[1].CFrame = Thing[1].CFrame
  1171. Mesh = Thing[7]
  1172. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1173. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1174. else
  1175. if Thing[2] == "Cylinder" then
  1176. Mesh = Thing[1].Mesh
  1177. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1178. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1179. else
  1180. if Thing[2] == "Blood" then
  1181. Mesh = Thing[7]
  1182. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  1183. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1184. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1185. else
  1186. if Thing[2] == "Elec" then
  1187. Mesh = Thing[1].Mesh
  1188. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1189. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1190. else
  1191. if Thing[2] == "Disappear" then
  1192. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1193. else
  1194. if Thing[2] == "Shatter" then
  1195. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1196. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1197. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1198. Thing[6] = Thing[6] + Thing[5]
  1199. end
  1200. end
  1201. end
  1202. end
  1203. end
  1204. end
  1205. end
  1206. else
  1207. Part.Parent = nil
  1208. table.remove(Effects, e)
  1209. end
  1210. end
  1211. end
  1212. end
  1213. end
  1214. end
  1215. end
  1216. --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement