Advertisement
memberhero

Fixed Script 3

Mar 29th, 2018
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 71.36 KB | None | 0 0
  1.  
  2. Player = game.Players.LocalPlayer
  3. Character = Player.Character
  4. leaderstats = Instance.new("StringValue",Player)
  5. leaderstats.Name = "leaderstats"
  6. Kills = Instance.new("StringValue",leaderstats)
  7. Kills.Name = "Kills"
  8. Kills.Value = 0
  9. local effectz = Instance.new('Model', Character)
  10. effectz.Name = "effects"
  11. PlayerGui = Player.PlayerGui
  12. mana=100
  13. Backpack = Player.Backpack
  14. Torso = Character.Torso
  15. Head = Character.Head
  16. Humanoid = Character.Humanoid
  17. LeftArm = Character["Left Arm"]
  18. LeftLeg = Character["Left Leg"]
  19. RightArm = Character["Right Arm"]
  20. RightLeg = Character["Right Leg"]
  21. LS = Torso["Left Shoulder"]
  22. RS = Torso["Right Shoulder"]
  23. Neck = Torso.Neck
  24. attacktype = 1
  25. vt = Vector3.new
  26. cf = CFrame.new
  27. euler = CFrame.fromEulerAnglesXYZ
  28. angles = CFrame.Angles
  29. necko = cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  30. necko2 = cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  31. LHC0 = cf(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  32. LHC1 = cf(-0.5, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  33. RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  34. RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  35. RootPart = Character.HumanoidRootPart
  36. RootJoint = RootPart.RootJoint
  37. RootCF = euler(-1.57, 0, 3.14)
  38. attack = false
  39. equipped = false
  40. local Anim = "Idle"
  41. local Effects = {}
  42. cam = workspace.CurrentCamera
  43. ZTarget = nil
  44. RocketTarget = nil
  45. local RbxUtility = LoadLibrary("RbxUtility")
  46. local Create = RbxUtility.Create
  47. local m = Create("Model"){
  48. Parent = Character,
  49. Name = "WeaponModel",
  50. }
  51. mouse = Player:GetMouse()
  52. RSH = Torso["Right Shoulder"]
  53. LSH = Torso["Left Shoulder"]
  54. RHP = Character.Torso["Right Hip"]
  55. LHP = Character.Torso["Left Hip"]
  56.  
  57.  
  58. if PlayerGui:findFirstChild("manaGUI",true) ~= nil then
  59. PlayerGui:findFirstChild("manaGUI",true).Parent = nil
  60. end
  61.  
  62.  
  63. local fengui = Instance.new("GuiMain")
  64. fengui.Parent = PlayerGui
  65. fengui.Name = "manaGUI"
  66. local fenframe = Instance.new("Frame")
  67. fenframe.Parent = fengui
  68. fenframe.BackgroundColor3 = Color3.new(255,255,255)
  69. fenframe.BackgroundTransparency = 1
  70. fenframe.BorderColor3 = Color3.new(17,17,17)
  71. fenframe.Size = UDim2.new(0.0500000007, 0, 0.100000001, 0)
  72. local fentext = Instance.new("TextLabel")
  73. fentext.Parent = fenframe
  74. fentext.Text = "Energy("..mana..")"
  75. fentext.BackgroundTransparency = 1
  76. fentext.SizeConstraint = "RelativeXY"
  77. fentext.TextXAlignment = "Center"
  78. fentext.TextYAlignment = "Center"
  79. fentext.Position = UDim2.new(0,80,1,200)
  80. local fentext2 = Instance.new("TextLabel")
  81. fentext2.Parent = fenframe
  82. fentext2.Text = " "
  83. fentext2.BackgroundTransparency = 0
  84. fentext2.BackgroundColor3 = Color3.new(0,0,0)
  85. fentext2.SizeConstraint = "RelativeXY"
  86. fentext2.TextXAlignment = "Center"
  87. fentext2.TextYAlignment = "Center"
  88. fentext2.Position = UDim2.new(0,10,1,170)
  89. fentext2.Size = UDim2.new(2.79999995,0,0.210000306,0)
  90. local fentext3 = Instance.new("TextLabel")
  91. fentext3.Parent = fenframe
  92. fentext3.Text = " "
  93. fentext3.BackgroundTransparency = 0
  94. fentext3.BackgroundColor3 = Color3.new(1,1,0)
  95. fentext3.SizeConstraint = "RelativeXY"
  96. fentext3.TextXAlignment = "Center"
  97. fentext3.TextYAlignment = "Center"
  98. fentext3.Position = UDim2.new(0,10,1,170)
  99. fentext3.Size = UDim2.new(mana/100,0,0.400000006,0)
  100.  
  101. coroutine.resume(coroutine.create(function()
  102. while true do
  103. wait(.1)
  104. fentext3.Size = UDim2.new(mana/36,0,0.200000006,0)
  105. fentext.Text = "Skill..("..mana.."%)"
  106. fentext3.BackgroundColor3 = Color3.new(1,1,0)
  107. fentext.TextStrokeTransparency=0
  108. fentext.TextColor3=Color3.new(1,1,0)
  109. end
  110. end))
  111. coroutine.resume(coroutine.create(function()
  112. while true do
  113. wait(0.1)
  114. if mana <= 0 and attack == false then
  115. attack = true
  116. while mana <= 50 do
  117. wait(0.1)
  118. mana = mana + 5
  119. end
  120. attack = false
  121. end
  122. if mana < 100 and attack == false then
  123. mana = mana + 1
  124. end
  125. end
  126. end))
  127.  
  128. function NoOutline(Part)
  129. Part.TopSurface, Part.BottomSurface, Part.LeftSurface, Part.RightSurface, Part.FrontSurface, Part.BackSurface = 10, 10, 10, 10, 10, 10
  130. end
  131. ArtificialHB = Instance.new("BindableEvent", script)
  132. ArtificialHB.Name = "Heartbeat"
  133. script:WaitForChild("Heartbeat")
  134. frame = 1 / 30
  135. tf = 0
  136. allowframeloss = true
  137. tossremainder = false
  138. lastframe = tick()
  139. script.Heartbeat:Fire()
  140. game:GetService("RunService").Heartbeat:connect(function(s, p)
  141.  
  142. tf = tf + s
  143. if frame <= tf then
  144. if allowframeloss then
  145. script.Heartbeat:Fire()
  146. lastframe = tick()
  147. else
  148. for i = 1, math.floor(tf / frame) do
  149. script.Heartbeat:Fire()
  150. end
  151. lastframe = tick()
  152. end
  153. if tossremainder then
  154. tf = 0
  155. else
  156. tf = tf - frame * math.floor(tf / frame)
  157. end
  158. end
  159. end
  160. )
  161. swait = function(num)
  162.  
  163. if num == 0 or num == nil then
  164. ArtificialHB.Event:wait()
  165. else
  166. for i = 0, num do
  167. ArtificialHB.Event:wait()
  168. end
  169. end
  170. end
  171. function nooutline(part)
  172. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  173. end
  174.  
  175. function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
  176. local fp = Create("Part"){
  177. formFactor = formfactor,
  178. Parent = parent,
  179. Reflectance = reflectance,
  180. Transparency = transparency,
  181. CanCollide = false,
  182. Locked = true,
  183. BrickColor = BrickColor.new(tostring(brickcolor)),
  184. Name = name,
  185. Size = size,
  186. Position = Character.Torso.Position,
  187. Material = material,
  188. }
  189. nooutline(fp)
  190. return fp
  191. end
  192.  
  193. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  194. local Msh = Create(Mesh){
  195. Parent = part,
  196. Offset = offset,
  197. Scale = scale,
  198. }
  199. if Mesh == "SpecialMesh" then
  200. Msh.MeshType = meshtype
  201. Msh.MeshId = meshid
  202. end
  203. return Msh
  204. end
  205.  
  206. function weld(parent, part0, part1, c0, c1)
  207. local Weld = Create("Weld"){
  208. Parent = parent,
  209. Part0 = part0,
  210. Part1 = part1,
  211. C0 = c0,
  212. C1 = c1,
  213. }
  214. return Weld
  215. end
  216.  
  217.  
  218. local function CFrameFromTopBack(at, top, back)
  219. local right = top:Cross(back)
  220. return CFrame.new(at.x, at.y, at.z,
  221. right.x, top.x, back.x,
  222. right.y, top.y, back.y,
  223. right.z, top.z, back.z)
  224. end
  225.  
  226. function Triangle(a, b, c)
  227. local edg1 = (c - a):Dot((b - a).unit)
  228. local edg2 = (a - b):Dot((c - b).unit)
  229. local edg3 = (b - c):Dot((a - c).unit)
  230. if edg1 <= (b - a).magnitude and edg1 >= 0 then
  231. a, b, c = a, b, c
  232. elseif edg2 <= (c - b).magnitude and edg2 >= 0 then
  233. a, b, c = b, c, a
  234. elseif edg3 <= (a - c).magnitude and edg3 >= 0 then
  235. a, b, c = c, a, b
  236. else
  237. assert(false, "unreachable")
  238. end
  239.  
  240. local len1 = (c - a):Dot((b - a).unit)
  241. local len2 = (b - a).magnitude - len1
  242. local width = (a + (b - a).unit * len1 - c).magnitude
  243.  
  244. local maincf = CFrameFromTopBack(a, (b - a):Cross(c - b).unit, -(b - a).unit)
  245.  
  246. local list = {}
  247.  
  248. local Color = BrickColor.new("Dark stone grey")
  249.  
  250. if len1 > 0.01 then
  251. local w1 = Create('WedgePart', m){
  252. Material = "SmoothPlastic",
  253. FormFactor = 'Custom',
  254. BrickColor = Color,
  255. Transparency = 0,
  256. Reflectance = 0,
  257. Material = "SmoothPlastic",
  258. CanCollide = false,
  259. Anchored = true,
  260. Parent = workspace,
  261. Transparency = 0.3,
  262. }
  263. game:GetService("Debris"):AddItem(w1, 5)
  264. NoOutline(w1)
  265. local sz = Vector3.new(0.2, width, len1)
  266. w1.Size = sz
  267. local sp = Create("SpecialMesh"){
  268. Parent = w1,
  269. MeshType = "Wedge",
  270. Scale = Vector3.new(0, 1, 1) * sz / w1.Size,
  271. }
  272. w1:BreakJoints()
  273. table.insert(Effects, {
  274. w1,
  275. "Disappear",
  276. .03
  277. })
  278. w1.CFrame = maincf * CFrame.Angles(math.pi, 0, math.pi / 2) * CFrame.new(0, width / 2, len1 / 2)
  279. table.insert(list, w1)
  280. end
  281. if len2 > 0.01 then
  282. local w2 = Create('WedgePart', m){
  283. Material = "SmoothPlastic",
  284. FormFactor = 'Custom',
  285. BrickColor = Color,
  286. Transparency = 0,
  287. Reflectance = 0,
  288. Material = "SmoothPlastic",
  289. CanCollide = false,
  290. Anchored = true,
  291. Parent = workspace,
  292. Transparency = 0.3,
  293. }
  294. game:GetService("Debris"):AddItem(w2, 5)
  295. NoOutline(w2)
  296. local sz = Vector3.new(0.2, width, len2)
  297. w2.Size = sz
  298. local sp = Create("SpecialMesh"){
  299. Parent = w2,
  300. MeshType = "Wedge",
  301. Scale = Vector3.new(0, 1, 1) * sz / w2.Size,
  302. }
  303. w2:BreakJoints()
  304. table.insert(Effects, {
  305. w2,
  306. "Disappear",
  307. .03
  308. })
  309. w2.CFrame = maincf * CFrame.Angles(math.pi, math.pi, -math.pi / 2) * CFrame.new(0, width / 2, -len1 - len2 / 2)
  310. table.insert(list, w2)
  311. end
  312. return unpack(list)
  313. end
  314.  
  315. function so(id, par, vol, pit)
  316. coroutine.resume(coroutine.create(function()
  317. local sou = Instance.new("Sound", par or workspace)
  318. sou.Volume = vol
  319. sou.Pitch = pit or 1
  320. sou.SoundId = id
  321. swait()
  322. sou:play()
  323. swait(6)
  324. sou:Remove()
  325. end))
  326. end
  327.  
  328. function clerp(a, b, t)
  329.  
  330. local function QuaternionFromCFrame(cf)
  331. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  332. local trace = m00 + m11 + m22
  333. if trace > 0 then
  334. local s = math.sqrt(1 + trace)
  335. local recip = 0.5 / s
  336. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  337. else
  338. local i = 0
  339. if m11 > m00 then
  340. i = 1
  341. end
  342. if m22 > (i == 0 and m00 or m11) then
  343. i = 2
  344. end
  345. if i == 0 then
  346. local s = math.sqrt(m00 - m11 - m22 + 1)
  347. local recip = 0.5 / s
  348. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  349. elseif i == 1 then
  350. local s = math.sqrt(m11 - m22 - m00 + 1)
  351. local recip = 0.5 / s
  352. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  353. elseif i == 2 then
  354. local s = math.sqrt(m22 - m00 - m11 + 1)
  355. local recip = 0.5 / s
  356. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  357. end
  358. end
  359. end
  360.  
  361. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  362. local xs, ys, zs = x + x, y + y, z + z
  363. local wx, wy, wz = w * xs, w * ys, w * zs
  364. local xx = x * xs
  365. local xy = x * ys
  366. local xz = x * zs
  367. local yy = y * ys
  368. local yz = y * zs
  369. local zz = z * zs
  370. 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))
  371. end
  372.  
  373. local function QuaternionSlerp(a, b, t)
  374. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  375. local startInterp, finishInterp;
  376. if cosTheta >= 0.0001 then
  377. if (1 - cosTheta) > 0.0001 then
  378. local theta = math.acos(cosTheta)
  379. local invSinTheta = 1 / math.sin(theta)
  380. startInterp = math.sin((1 - t) * theta) * invSinTheta
  381. finishInterp = math.sin(t * theta) * invSinTheta
  382. else
  383. startInterp = 1 - t
  384. finishInterp = t
  385. end
  386. else
  387. if (1 + cosTheta) > 0.0001 then
  388. local theta = math.acos(-cosTheta)
  389. local invSinTheta = 1 / math.sin(theta)
  390. startInterp = math.sin((t - 1) * theta) * invSinTheta
  391. finishInterp = math.sin(t * theta) * invSinTheta
  392. else
  393. startInterp = t - 1
  394. finishInterp = t
  395. end
  396. end
  397. 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
  398. end
  399.  
  400. local qa = {
  401. QuaternionFromCFrame(a)
  402. }
  403. local qb = {
  404. QuaternionFromCFrame(b)
  405. }
  406. local ax, ay, az = a.x, a.y, a.z
  407. local bx, by, bz = b.x, b.y, b.z
  408.  
  409. local _t = 1 - t
  410. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  411. end
  412.  
  413. function rayCast(Pos, Dir, Max, Ignore)
  414. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  415. end
  416.  
  417. Damagefunc = function(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  418. if hit.Parent == nil then
  419. return
  420. end
  421. local h = hit.Parent:FindFirstChild("Humanoid")
  422. for _, v in pairs(hit.Parent:children()) do
  423. if v:IsA("Humanoid") then
  424. h = v
  425. end
  426. end
  427. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  428. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  429. if hit.Parent.DebounceHit.Value == true then
  430. return
  431. end
  432. end
  433. local c = Create("ObjectValue"){
  434. Name = "creator",
  435. Value = game:service("Players").LocalPlayer,
  436. Parent = h,
  437. }
  438. game:GetService("Debris"):AddItem(c, .5)
  439. if HitSound ~= nil and HitPitch ~= nil then
  440. so(HitSound, hit, 1, HitPitch)
  441. end
  442. local Damage = math.random(minim, maxim)
  443. local blocked = false
  444. local block = hit.Parent:findFirstChild("Block")
  445. if block ~= nil then
  446. if block.className == "IntValue" then
  447. if block.Value > 0 then
  448. blocked = true
  449. block.Value = block.Value - 1
  450. print(block.Value)
  451. end
  452. end
  453. end
  454. if blocked == false then
  455. local HitHealth=h.Health
  456. h.Health = h.Health - Damage
  457. if HitHealth~=h.Health and HitHealth~=0 and h.Health<=0 and h.Parent.Name~="Hologram" then
  458. print("gained spree")
  459. ----game.Players.LocalPlayer:FindFirstChild("leaderstats").Spree.Value=game.Players.LocalPlayer.leaderstats.Spree.Value+1
  460. end
  461. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, Part.BrickColor.Color, Handle.BrickColor.Color)
  462. if HitHealth~=h.Health and HitHealth~=0 and h.Health<=0 and h.Parent.Name~="Hologram" then
  463. print("gained kill")
  464. Player.leaderstats.Kills.Value = Player.leaderstats.Kills.Value + 1
  465. end
  466. else
  467. h.Health = h.Health - (Damage / 2)
  468. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, Part.BrickColor.Color, Handle.BrickColor.Color)
  469. end
  470. if Type == "Knockdown" then
  471. local hum = hit.Parent.Humanoid
  472. hum.PlatformStand = true
  473. coroutine.resume(coroutine.create(function(HHumanoid)
  474. swait(1)
  475. HHumanoid.PlatformStand = false
  476. end), hum)
  477. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  478. local bodvol = Create("BodyVelocity"){
  479. velocity = angle * knockback,
  480. P = 5000,
  481. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  482. Parent = hit,
  483. }
  484. local rl = Create("BodyAngularVelocity"){
  485. P = 3000,
  486. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  487. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  488. Parent = hit,
  489. }
  490. game:GetService("Debris"):AddItem(bodvol, .5)
  491. game:GetService("Debris"):AddItem(rl, .5)
  492. elseif Type == "Normal" then
  493. local vp = Create("BodyVelocity"){
  494. P = 500,
  495. maxForce = Vector3.new(math.huge, 0, math.huge),
  496. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  497. }
  498. if knockback > 0 then
  499. vp.Parent = hit.Parent.Torso
  500. end
  501. game:GetService("Debris"):AddItem(vp, .5)
  502. elseif Type == "Up" then
  503. local bodyVelocity = Create("BodyVelocity"){
  504. velocity = vt(0, 20, 0),
  505. P = 5000,
  506. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  507. Parent = hit,
  508. }
  509. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  510. elseif Type == "Snare" then
  511. local bp = Create("BodyPosition"){
  512. P = 2000,
  513. D = 100,
  514. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  515. position = hit.Parent.Torso.Position,
  516. Parent = hit.Parent.Torso,
  517. }
  518. game:GetService("Debris"):AddItem(bp, 1)
  519. elseif Type == "Freeze" then
  520. local BodPos = Create("BodyPosition"){
  521. P = 50000,
  522. D = 1000,
  523. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  524. position = hit.Parent.Torso.Position,
  525. Parent = hit.Parent.Torso,
  526. }
  527. local BodGy = Create("BodyGyro") {
  528. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  529. P = 20e+003,
  530. Parent = hit.Parent.Torso,
  531. cframe = hit.Parent.Torso.CFrame,
  532. }
  533. hit.Parent.Torso.Anchored = true
  534. coroutine.resume(coroutine.create(function(Part)
  535. swait(1.5)
  536. Part.Anchored = false
  537. end), hit.Parent.Torso)
  538. game:GetService("Debris"):AddItem(BodPos, 3)
  539. game:GetService("Debris"):AddItem(BodGy, 3)
  540. end
  541. local debounce = Create("BoolValue"){
  542. Name = "DebounceHit",
  543. Parent = hit.Parent,
  544. Value = true,
  545. }
  546. game:GetService("Debris"):AddItem(debounce, Delay)
  547. c = Instance.new("ObjectValue")
  548. c.Name = "creator"
  549. c.Value = Player
  550. c.Parent = h
  551. game:GetService("Debris"):AddItem(c, .5)
  552. end
  553. end
  554.  
  555. function ShowDamage(Pos, Text, Time, Color, Color2)
  556. local Rate = (1 / 30)
  557. local Pos = (Pos or Vector3.new(0, 0, 0))
  558. local Text = (Text or "")
  559. local Time = (Time or 2)
  560. local Color = (Color or Color3.new(1, 0, 0))
  561. local EffectPart = part("Custom", workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", vt(0, 0, 0))
  562. EffectPart.Anchored = true
  563. local BillboardGui = Create("BillboardGui"){
  564. Size = UDim2.new(3, 0, 3, 0),
  565. Adornee = EffectPart,
  566. Parent = EffectPart,
  567. }
  568. local TextLabel = Create("TextLabel"){
  569. BackgroundTransparency = 1,
  570. Size = UDim2.new(1, 0, 1, 0),
  571. Text = Text,
  572. TextColor3 = Color,
  573. TextScaled = true,
  574. Font = Enum.Font.ArialBold,
  575. FontSize = Enum.FontSize.Size10,
  576. TextStrokeColor3 = Color2,
  577. TextStrokeTransparency = 0.8,
  578. Parent = BillboardGui,
  579. }
  580. game.Debris:AddItem(EffectPart, (Time + 0.1))
  581. EffectPart.Parent = game:GetService("Workspace")
  582. delay(0, function()
  583. local Frames = (Time / Rate)
  584. for Frame = 1, Frames do
  585. wait(Rate)
  586. local Percent = (Frame / Frames)
  587. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  588. TextLabel.TextTransparency = Percent
  589. end
  590. if EffectPart and EffectPart.Parent then
  591. EffectPart:Destroy()
  592. end
  593. end)
  594. end
  595.  
  596. Handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Handle",Vector3.new(0.280000031, 0.699999988, 0.280000001))
  597. Handleweld=weld(m,Character["Right Arm"],Handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0860519409, -0.159469604, 1.00696373, 1, -1.72803976e-011, 1.90765604e-006, 1.90764786e-006, 4.44081707e-006, -1, 9.09494702e-012, 0.999999881, 4.44081707e-006))
  598. FakeHandle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","FakeHandle",Vector3.new(0.280000031, 0.699999988, 0.280000001))
  599. FakeHandleweld=weld(m,Handle,FakeHandle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.90734863e-006, 0.0707168579, 0.0574593544, 1, -8.18545232e-012, 2.86099269e-013, -8.18545232e-012, 1, 4.54747351e-013, 2.86099269e-013, 4.54747351e-013, 1))
  600. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  601. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000375747681, -1.18781972, 0.839702606, -1, -1.02313925e-006, -2.56240446e-006, 2.56240173e-006, 1.79690323e-006, -1, 1.02317256e-006, -1, -1.79690414e-006))
  602. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  603. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.200000003, 0.420000017, 0.200000003))
  604. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.889633477, -0.979663849, 0.0548973083, -0.258811921, -5.54403186e-006, -0.96592772, -3.15453076e-006, 1, -4.89435752e-006, 0.96592778, 1.78029984e-006, -0.258811951))
  605. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=111896510",Vector3.new(0, 0, 0),Vector3.new(0.349999994, 0.349999994, 0.349999994))
  606. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.200000003, 0.200000003, 0.280000001))
  607. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.279872894, 0.209986687, -1.33514404e-005, -3.935309e-006, 1, -2.90573007e-006, 1.08481819e-008, 2.90573598e-006, 1, 1, 3.93527625e-006, -1.08583693e-008))
  608. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.519399941, 0.557200074, 1.74439991))
  609. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.200000003, 0.420000017, 0.200000003))
  610. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.889616966, -0.979663849, -0.0549716949, 0.258811742, -5.84206009e-006, -0.96592778, -1.50227504e-006, 1, -6.45063938e-006, 0.965927839, 3.12056136e-006, 0.258811772))
  611. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=111896510",Vector3.new(0, 0, 0),Vector3.new(0.349999994, 0.349999994, 0.349999994))
  612. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.420000046, 0.280000061, 0.560000002))
  613. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.419868469, 7.62939453e-006, 2.7179718e-005, 3.83001225e-006, -1, 2.54809993e-006, 1, 3.82997496e-006, 3.03872399e-010, -3.12454534e-010, 2.54810584e-006, 1))
  614. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  615. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.280000031, 0.700000048, 0.280000001))
  616. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.14440918e-005, 0.552843094, 0.296955109, 1, -2.22826202e-011, 1.80189787e-011, -7.95807864e-013, 0.707115233, -0.707098365, -1.73940862e-011, 0.707098365, 0.707115233))
  617. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000046, 0.28700006, 0.280000031))
  618. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.41986084, 0.00234603882, 2.14576721e-005, 3.74060505e-006, -1, 2.30967612e-006, 1, 3.74057413e-006, -7.42010826e-008, 7.41938067e-008, 2.30968203e-006, 1))
  619. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  620. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.287, 0.560000062, 0.200000003))
  621. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00273132324, 0.622810364, 0.296985626, 1, -2.22826202e-011, 1.80189787e-011, -7.95807864e-013, 0.707115233, -0.707098365, -1.73940862e-011, 0.707098365, 0.707115233))
  622. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.699999988))
  623. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.420000046, 0.280000061, 0.420000017))
  624. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.839817047, -1.90734863e-005, -0.489821672, 3.8300077e-006, -1, 2.53319945e-006, 1, 3.82997496e-006, 3.04327147e-010, -3.12426113e-010, 2.53320582e-006, 1))
  625. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  626. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000046, 0.28700006, 0.280000031))
  627. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.839794159, 0.00254631042, -0.49509263, 3.8300077e-006, -1, 2.53319945e-006, 1, 3.82997496e-006, 3.04327147e-010, -3.12426113e-010, 2.53320582e-006, 1))
  628. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  629. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.280000031, 0.420000046, 0.980000079))
  630. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.90734863e-006, -0.559818268, 0.0699512959, 1, -2.04636308e-011, 7.38572398e-013, -1.63709046e-011, 1, 2.6823227e-007, 7.82044568e-013, -2.68225904e-007, 1))
  631. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.280000001))
  632. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.279872894, 0.209986687, -1.33514404e-005, -3.935309e-006, 1, -2.90573007e-006, 1.08481819e-008, 2.90573598e-006, 1, 1, 3.93527625e-006, -1.08583693e-008))
  633. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.491399914, 0.557200074, 1.74439991))
  634. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.280000031, 0.200000003, 0.560000062))
  635. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-2.0980835e-005, -0.419818878, 0.839810848, 1, -2.13731255e-011, -1.65118821e-011, -1.54614099e-011, 1, 2.62222466e-006, 1.80325338e-011, -2.62221829e-006, 1))
  636. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  637. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000017, 0.420000017, 0.560000002))
  638. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.559810638, -0.769824028, -3.43322754e-005, 1.45437184e-007, -1, -1.29630371e-006, -2.08639904e-007, 1.29629734e-006, -1, 1, 1.45400691e-007, -2.08638184e-007))
  639. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  640. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.280000061, 0.280000061, 0.280000031))
  641. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.209846497, -3.81469727e-006, 0.559957266, 1.49184416e-008, -1, -6.10877123e-007, 1, 1.48816071e-008, 2.96593194e-010, -2.95063474e-010, -6.10870757e-007, 1))
  642. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  643. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.287, 0.840000033, 0.200000003))
  644. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00215530396, -0.0698623657, 0.000190734863, 1, -2.22826202e-011, 1.80189787e-011, -1.43245416e-011, 1, 2.69661223e-006, -1.68107646e-011, -2.69660586e-006, 1))
  645. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.699999988))
  646. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.287, 0.200000003, 0.560000002))
  647. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0021572113, -0.559833527, -0.0698022842, 1, -5.50244295e-011, 1.91965506e-011, -4.70663508e-011, 1, 2.69661314e-006, -1.56331059e-011, -2.69659495e-006, 1))
  648. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  649. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.287, 0.427000016, 0.200000003))
  650. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000122070313, -0.560840607, 0.27643466, 1, -2.22826202e-011, 1.80189787e-011, -1.43245416e-011, 1, 8.19589786e-007, -1.68107889e-011, -8.1958342e-007, 1))
  651. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.699999988))
  652. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.420000017, 0.420000017, 0.280000031))
  653. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.55978775, -2.44724131, -0.000165939331, 1.45490276e-007, -1, -2.49798723e-005, -2.08999595e-007, 2.49798668e-005, -1, 1, 1.45458671e-007, -2.08994436e-007))
  654. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  655. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.420000017, 0.280000001, 0.560000062))
  656. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.559822083, 0, -0.419999123, 5.95878191e-008, 1, 1.94764652e-007, -1, 5.9624881e-008, 3.44258311e-008, 3.44273339e-008, -1.94758286e-007, 1))
  657. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  658. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.280000031, 0.200000003, 0.200000003))
  659. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0.279838562, 0.21000886, 1, 4.46839294e-008, 1.44186561e-006, 4.47196271e-008, -1, 7.78919912e-007, 1.44186413e-006, -7.78926278e-007, -1))
  660. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 0.699999988))
  661. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000017, 0.560000002, 0.420000017))
  662. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.559791565, -0.55984664, 3.81469727e-005, 1.4543707e-007, -1, -5.08004541e-006, -2.08696321e-007, 5.08003723e-006, -1, 1, 1.45401373e-007, -2.08694047e-007))
  663. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  664. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.280000031, 0.200000003, 0.200000003))
  665. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(5.91278076e-005, 0.279800415, 1.04951167, -1, -2.53198436e-007, 1.49545034e-008, 2.53235044e-007, -1, -7.584179e-006, 1.49579638e-008, -7.58417036e-006, 1))
  666. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 0.699999988))
  667. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.420000017, 0.560000062, 0.200000003))
  668. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.559768677, -2.37841272, -0.000438690186, 1.45475724e-007, -1, -2.01288749e-005, -2.08974669e-007, 2.01288676e-005, -1, 1, 1.45443096e-007, -2.08970206e-007))
  669. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.699999988))
  670. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000017, 0.280000001, 0.420000017))
  671. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.55979538, -0.979748011, 7.62939453e-006, 1.45442073e-007, -1, -6.30070645e-006, -2.08722611e-007, 6.30070008e-006, -1, 1, 1.45406489e-007, -2.08720166e-007))
  672. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  673. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.280000031, 0.200000003, 0.560000002))
  674. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.90734863e-006, -0.27980423, 0.699883938, 1, -2.04636308e-011, 1.10889423e-012, -1.63709046e-011, 1, 2.11572933e-006, 4.11753964e-013, -2.11572296e-006, 1))
  675. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  676. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.280000031, 0.200000003, 0.560000062))
  677. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-3.24249268e-005, -0.699771881, 0.839804649, 1, -2.13731255e-011, -1.66693187e-011, -1.54614099e-011, 1, 4.23093024e-006, 1.81899929e-011, -4.23092433e-006, 1))
  678. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  679. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.280000031, 0.200000003, 0.200000003))
  680. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.76837158e-005, -0.559803009, 1.0495255, 1, -1.56887836e-011, 3.45319641e-011, -2.09183781e-011, 1, 5.48155458e-006, -3.30136751e-011, -5.48154867e-006, 1))
  681. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 0.699999988))
  682. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  683. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000427246094, -2.58794498, 0.839736938, -1, -1.49499328e-008, -2.52553122e-007, 2.52551388e-007, 1.52605935e-005, -1, 1.49906327e-008, -1, -1.52605971e-005))
  684. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  685. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  686. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.83972168, -2.44782782, -0.000438690186, 1.45468562e-007, -1, -2.04852658e-005, -2.09350546e-007, 2.04852604e-005, -1, 1, 1.45436047e-007, -2.09346027e-007))
  687. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  688. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  689. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.000421524048, 2.30780578, 0.83972168, 1, 5.67174197e-007, 2.54727388e-006, -2.54726456e-006, -1.37063362e-005, 1, 5.67245934e-007, -1, -1.37063407e-005))
  690. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  691. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  692. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00043296814, 2.30763364, -0.27973938, -1, 1.49386779e-008, 2.53097255e-007, 2.53098563e-007, -1.32949481e-005, 1, 1.49050265e-008, 1, 1.32949544e-005))
  693. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  694. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  695. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.279750824, 2.44781303, -0.000444412231, 1.45382273e-007, 1, 2.08481797e-005, -2.08853876e-007, -2.08481761e-005, 1, 1, -1.45423428e-007, 2.08852413e-007))
  696. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  697. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  698. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00043296814, -2.58781743, -0.279773712, 1, -5.67145435e-007, -2.54751899e-006, -2.54751376e-006, 1.19385704e-005, -1, 5.67138841e-007, 1, 1.19385777e-005))
  699. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  700. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.231000006, 0.200000003, 0.280000031))
  701. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.560119629, -2.59035707, -0.000175476074, 3.96057294e-006, -1, -2.42740825e-005, -2.09122135e-007, 2.42740789e-005, -1, 1, 3.96054475e-006, -2.09025103e-007))
  702. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  703. Barrel=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Barrel",Vector3.new(0.200000003, 0.200000003, 0.280000031))
  704. Barrelweld=weld(m,FakeHandle,Barrel,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.562404633, -2.59142828, -0.000175476074, 3.96057203e-006, -1, -2.4095265e-005, -2.09117701e-007, 2.40952577e-005, -1, 1, 3.96054384e-006, -2.09021465e-007))
  705. mesh("CylinderMesh",Barrel,"","",Vector3.new(0, 0, 0),Vector3.new(0.945000052, 0.699999988, 1))
  706. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000017, 0.200000003, 0.280000031))
  707. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.559753418, -1.60731864, -0.000179290771, 1.45490958e-007, -1, -2.51584643e-005, -2.09002877e-007, 2.51584588e-005, -1, 1, 1.45459353e-007, -2.0899769e-007))
  708. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  709. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000017, 0.200000003, 0.280000031))
  710. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.559776306, -2.16727662, -0.000164031982, 1.45485501e-007, -1, -2.33735591e-005, -2.08965247e-007, 2.33735518e-005, -1, 1, 1.45453555e-007, -2.08960316e-007))
  711. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  712. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.420000017, 0.420000046, 0.280000031))
  713. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.559776306, -1.88730073, -0.000165939331, 1.45485956e-007, -1, -2.35518892e-005, -2.08967805e-007, 2.35518837e-005, -1, 1, 1.4545401e-007, -2.08962845e-007))
  714. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  715. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.420000017, 0.280000061, 0.280000031))
  716. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.559753418, -1.39711809, -0.000173568726, 1.45514491e-007, -1, -2.24795003e-005, -2.08946716e-007, 2.24794821e-005, -1, 1, 1.45416834e-007, -2.08939554e-007))
  717. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  718. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000017, 0.420000046, 0.200000003))
  719. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.559764862, -1.88847375, -0.000436782837, 1.45466288e-007, -1, -1.8521725e-005, -2.08988865e-007, 1.85217195e-005, -1, 1, 1.45433319e-007, -2.08984645e-007))
  720. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.699999988))
  721. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.420000017, 0.560000062, 0.200000003))
  722. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.559757233, -1.39839482, -0.000442504883, 1.45464355e-007, -1, -1.69149826e-005, -2.08905689e-007, 1.69149753e-005, -1, 1, 1.45431045e-007, -2.08901696e-007))
  723. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.699999988))
  724. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000046, 0.287, 0.420000017))
  725. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.559772491, 0.00134277344, -0.0700860023, -7.44953468e-008, -1, -4.73725959e-006, 1, -7.45317266e-008, -7.42083941e-008, 7.42095523e-008, -4.73725368e-006, 1))
  726. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  727. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000046, 0.287, 0.280000031))
  728. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.559783936, 0.00134277344, -0.420075655, -7.44639692e-008, -1, -5.6308827e-006, 1, -7.45658326e-008, -7.42004715e-008, 7.42039248e-008, -5.63086405e-006, 1))
  729. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  730. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.420000017, 0.280000001, 0.560000062))
  731. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.5598526, 1.52587891e-005, 1.11974049, 5.9590775e-008, 1, 2.51883012e-006, -1, 5.96276095e-008, 3.44174609e-008, 3.441885e-008, -2.51882193e-006, 1))
  732. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  733. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  734. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00018119812, -0.844371796, 0.276464224, 1, -2.20552465e-011, 1.82033399e-011, -1.47792889e-011, 1, 1.78784603e-006, -1.66827021e-011, -1.78783966e-006, 1))
  735. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.735000134, 0.699999988, 0.699999988))
  736. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.280000001, 0.200000003, 0.280000091))
  737. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.769760132, 0.000406265259, -0.279969931, 5.95582605e-008, 1, 2.26564134e-006, -1, 5.96603513e-008, 3.44175426e-008, 3.44209745e-008, -2.26562315e-006, 1))
  738. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  739. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.700000048, 0.200000003))
  740. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.839698792, -0.0692727566, -0.000392913818, 1.45439344e-007, -1, -9.2651635e-006, -2.0875224e-007, 9.26515713e-006, -1, 1, 1.45404442e-007, -2.0874937e-007))
  741. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 1, 0.699999988))
  742. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.699999988, 0.200000003))
  743. Partweld=weld(m,FakeHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.839668274, -0.768940926, -0.000394821167, 1.45451168e-007, -1, -1.17661502e-005, -2.08743202e-007, 1.17661421e-005, -1, 1, 1.45416834e-007, -2.08739948e-007))
  744. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 1, 0.699999988))
  745.  
  746. Handleweld.Part0 = LeftLeg
  747. Handleweld.C0 = angles(-2, 0, 0) * cf(-.5, 1.3, 1)
  748.  
  749. local PE1 = Create("ParticleEmitter"){
  750. Parent = Barrel,
  751. Color = ColorSequence.new(BrickColor.new("New Yeller").Color),
  752. Transparency = NumberSequence.new(0),
  753. Size = NumberSequence.new(.5),
  754. Texture = "rbxassetid://257430870",
  755. Lifetime = NumberRange.new(.1),
  756. Rate = 100,
  757. VelocitySpread = 180,
  758. Rotation = NumberRange.new(0),
  759. Speed = NumberRange.new(0),
  760. LightEmission = .6,
  761. LockedToPart = true,
  762. Enabled = false
  763. }
  764.  
  765. local PE2 = PE1:Clone()
  766. PE2.Size = NumberSequence.new(.7)
  767. PE2.LightEmission = 1
  768. PE2.Texture = "rbxassetid://87729590"
  769.  
  770. local Lite = Create("PointLight"){
  771. Parent = Barrel,
  772. Color = BrickColor.new("New Yeller").Color,
  773. Shadows = true,
  774. Range = 10,
  775. Brightness = 0.5,
  776. Enabled = false
  777. }
  778.  
  779. function Equip()
  780. attack = true
  781. equipped = true
  782. RSH.Parent = nil
  783. LSH.Parent = nil
  784.  
  785. RHP.Parent = nil
  786. LHP.Parent = nil
  787.  
  788. RW = Create("Weld"){
  789. Name = "Right Shoulder",
  790. Part0 = Torso ,
  791. C0 = cf(1.5, 0.5, 0),
  792. C1 = cf(0, 0.5, 0),
  793. Part1 = RightArm ,
  794. Parent = Torso ,
  795. }
  796.  
  797. LW = Create("Weld"){
  798. Name = "Left Shoulder",
  799. Part0 = Torso ,
  800. C0 = cf(-1.5, 0.5, 0),
  801. C1 = cf(0, 0.5, 0) ,
  802. Part1 = LeftArm ,
  803. Parent = Torso ,
  804. }
  805.  
  806. RH = Create("Weld"){
  807. Part0 = Torso,
  808. C0 = cf(0, -1.5, 0), --* euler(1.3, 0, -0.5)
  809. C1 = cf(-0.5, 0.5, 0) ,
  810. Part1 = Character["Right Leg"],
  811. Parent = Torso,
  812. }
  813.  
  814. LH = Create("Weld"){
  815. Part0 = Torso,
  816. C0 = cf(0, -1.5, 0), --* euler(1.3, 0, -0.5)
  817. C1 = cf(0.5, 0.5, 0) ,
  818. Part1 = Character["Left Leg"],
  819. Parent = Torso,
  820. }
  821.  
  822. for i = 0, 1, 0.1 do
  823. swait()
  824. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  825. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(30), math.rad(0), math.rad(30)), .3)
  826. RW.C0 = clerp(RW.C0, CFrame.new(0, 0.2, -.5) * angles(math.rad(20), math.rad(0), math.rad(-50)), 0.3)
  827. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-5), math.rad(0), math.rad(-10)), 0.3)
  828. RH.C0 = clerp(RH.C0, cf(0.03, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(2)), .3)
  829. LH.C0 = clerp(LH.C0, cf(-0.03, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-2)), .3)
  830. end
  831. Handleweld.Part0 = RightArm
  832. Handleweld.C0 = euler(0, 0, 0) * cf(0, 0, 0)
  833. attack = false
  834. end
  835.  
  836. function Unequip()
  837. equipped = false
  838. attack = true
  839. for i = 0, 1, 0.1 do
  840. swait()
  841. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  842. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(30), math.rad(0), math.rad(30)), .3)
  843. RW.C0 = clerp(RW.C0, CFrame.new(.5, 0.2, -.7) * angles(math.rad(20), math.rad(0), math.rad(-50)), 0.3)
  844. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-30)), 0.3)
  845. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(5)), .3)
  846. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .3)
  847. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) *euler(6*i,0,0), .5)
  848. end
  849. FakeHandleweld.C0 = angles(0, 0, 0) * cf(0, 0, 0)
  850. Handleweld.Part0 = LeftLeg
  851. Handleweld.C0 = angles(-2, 0, 0) * cf(-.5, 1.3, 1)
  852. RW.Parent = nil
  853. LW.Parent = nil
  854. RH.Parent = nil
  855. LH.Parent = nil
  856. RSH.Parent = Torso
  857. LSH.Parent = Torso
  858. RHP.Parent = Torso
  859. LHP.Parent = Torso
  860. Torso.Neck.C0 = necko
  861. RootJoint.C0 = RootCF
  862. RW.C0 = cf(1.5, 0.5, 0) * euler(0, 0, 0)
  863. RW.C1 = cf(0, 0.5, 0) * euler(0, 0, 0)
  864. LW.C0 = cf(-1.5, 0.5, 0) * euler(0, 0, 0)
  865. LW.C1 = cf(0, 0.5, 0) * euler(0, 0, 0)
  866. attack = false
  867. end
  868.  
  869. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  870. local prt = part(3, Character, "Neon", 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2))
  871. prt.Anchored = true
  872. prt.CFrame = cframe
  873. local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  874. game:GetService("Debris"):AddItem(prt, 5)
  875. Effects[#Effects + 1] = {
  876. prt,
  877. "Cylinder",
  878. delay,
  879. x3,
  880. y3,
  881. z3
  882. } --part, type, delay
  883. end
  884.  
  885. function MagnitudeDamage(Hit, Part, magni, mindam, maxdam, knock, Type)
  886. for _, c in pairs(workspace:children()) do
  887. local hum = c:findFirstChild("Humanoid")
  888. if hum ~= nil then
  889. local head = c:findFirstChild("Torso")
  890. if head ~= nil then
  891. local targ = head.Position - Part.Position
  892. local mag = targ.magnitude
  893. if mag <= magni and c.Name ~= Player.Name then
  894. Damagefunc(Hit, head, mindam, maxdam, knock, Type, RootPart, 0, "rbxassetid://199149186", 1)
  895. end
  896. end
  897. end
  898. end
  899. end
  900.  
  901. RailgunTarget = RootPart
  902. function Laser(asd)
  903. local MouseLook=cf((asd.Position+mouse.Hit.p)/2,mouse.Hit.p)
  904. local hit,pos = rayCast(asd.Position,MouseLook.lookVector,50,RailgunTarget.Parent)
  905. local mag=(asd.Position-pos).magnitude
  906. CylinderEffect(BrickColor.new("New Yeller"),CFrame.new((asd.Position+pos)/2,pos)*angles(1.57,0,0),1,mag*5,1,1.2,0,1.2,0.1)
  907. CylinderEffect(BrickColor.new("Really black"),CFrame.new((asd.Position+pos)/2,pos)*angles(1.57,0,0),1,mag*5,.5,1,0,.5,0.1)
  908. if hit~=nil then
  909. local ref=part(3,effectz,"SmoothPlastic",0,1,BrickColor.new("New Yeller"),"Reference",vt())
  910. ref.Anchored=true
  911. ref.CFrame=cf(pos)
  912. game:GetService("Debris"):AddItem(ref,1)
  913. Damagefunc(ref,hit,20,50,0,"Normal",RootPart,0)
  914. end
  915. end
  916.  
  917. RocketTarget = RootPart
  918. function Shoot(asd, spread1, spread2)
  919. local MainPos = asd.Position
  920. local MainPos2 = mouse.Hit.p
  921. local spread = vt((math.random(-spread1, 0) + math.random()) * spread2, (math.random(-spread1, 0) + math.random()) * spread2, (math.random(-spread1, 0) + math.random()) * spread2) * (asd.Position - mouse.Hit.p).magnitude / 100
  922. local MouseLook = cf((MainPos + MainPos2) / 2, MainPos2 + spread)
  923. num = 30
  924. coroutine.resume(coroutine.create(function(Spreaded)
  925. repeat
  926. wait()
  927. local hit, pos = rayCast(MainPos, MouseLook.lookVector, 10, RocketTarget.Parent)
  928. local TheHit = mouse.Hit.p
  929. local mag = (MainPos - pos).magnitude
  930. CylinderEffect(BrickColor.new("New Yeller"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 3, mag * 5, 3, .5, 0, 1.5, 0.1)
  931. MainPos = MainPos + (MouseLook.lookVector * 10)
  932. num = num - 1
  933. if hit ~= nil then
  934. num = 0
  935. local ref = part(3, effectz, "Neon", 0, 1, BrickColor.new("New Yeller"), "Reference", vt())
  936. ref.Anchored = true
  937. ref.CFrame = cf(pos)
  938. MagnitudeDamage(ref, hit, 5, 5, 10, 1, "Normal")
  939. game:GetService("Debris"):AddItem(ref, 5)
  940. end
  941. until num <= 0
  942. end))
  943. end
  944.  
  945. function ChargeEffect(part, x1, y1, z1, x2, y2, z2, x3, y3, z3, color)
  946. local S = Create("Part"){
  947. Material = "SmoothPlastic",
  948. Name = "Effect",
  949. formFactor = 0,
  950. Size = vt(x1, y1, z1),
  951. BrickColor = color,
  952. Reflectance = 0,
  953. TopSurface = 0,
  954. BottomSurface = 0,
  955. Transparency = 0,
  956. Anchored = false,
  957. CanCollide = false,
  958. Material = "Neon",
  959. CFrame = part.CFrame * cf(x2, y2, z2) * euler(x3, y3, z3),
  960. Parent = m,
  961. }
  962. local msh1 = Create("SpecialMesh"){
  963. Scale = vt(0.5, 0.5, 0.5) ,
  964. MeshType = "Sphere",
  965. Parent = S,
  966. }
  967. coroutine.resume(coroutine.create(function(Part, CF)
  968. local f = Instance.new("BodyPosition")
  969. f.P = 800
  970. f.D = 100
  971. f.maxForce = vt(math.huge, math.huge, math.huge)
  972. f.position = part.Position
  973. f.Parent = Part
  974. for i = 0, 1, 0.1 do
  975. wait()
  976. Part.Transparency = Part.Transparency + 0.1
  977. end
  978. Part.Parent = nil
  979. end), S, S.CFrame)
  980. end
  981.  
  982. local lasrs = {}
  983. local lasrspd = 3
  984. local maxTravelDistance = 500
  985. local maxRebounds = 20
  986.  
  987. function RAY(pos, dir, collidedlist, startpos, endpos, distleft)
  988. collidedlist = collidedlist or {Character}
  989. startpos = startpos or pos
  990. distleft = distleft or dir.unit * dir.magnitude
  991. endpos = endpos or pos + distleft
  992. local ray = Ray.new(pos, distleft)
  993. local hitz,enz = workspace:FindPartOnRayWithIgnoreList(ray, collidedlist)
  994. if hitz ~= nil and not hitz.Parent:findFirstChild("Humanoid") then
  995. if hitz.CanCollide == false then
  996. table.insert(collidedlist, hitz)
  997. local newpos = enz
  998. local newdistleft = distleft - (dir.unit * (pos - newpos).magnitude)
  999. if newdistleft then
  1000. return RAY(newpos-(dir*0.01), dir, collidedlist, startpos, endpos, newdistleft+(dir*0.01))
  1001. end
  1002. end
  1003. end
  1004. return hitz, enz, ray
  1005. end
  1006.  
  1007. function FindSurface(part, position)
  1008. local obj = part.CFrame:pointToObjectSpace(position)
  1009. local siz = part.Size/2
  1010. for i,v in pairs(Enum.NormalId:GetEnumItems()) do
  1011. local vec = Vector3.FromNormalId(v)
  1012. local wvec = part.CFrame:vectorToWorldSpace(vec)
  1013. local vz = (obj)/(siz*vec)
  1014. if (math.abs(vz.X-1) < 0.001 or math.abs(vz.Y-1) < 0.001 or math.abs(vz.Z-1) < 0.001) then
  1015. return wvec,vec
  1016. end
  1017. end
  1018. if part.className == "WedgePart" then
  1019. local pos = (part.CFrame * CFrame.new(0,part.Size.y/2,part.Size.z/2)).p
  1020. local apos = (part.CFrame * CFrame.Angles(-math.atan2(part.CFrame:pointToObjectSpace(pos).y,part.CFrame:pointToObjectSpace(pos).z),0,0) * CFrame.new(0,1,0)).p
  1021. local wvec,vec = (apos - part.Position).unit, part.CFrame:pointToObjectSpace(apos)
  1022. return wvec,vec
  1023. elseif part.className == "Part" and (part.Shape.Name == "Ball" or part.Shape.Name == "Cylinder") then
  1024. return (position - part.Position).unit, part.CFrame:vectorToObjectSpace((position - part.Position).unit)
  1025. end
  1026. end
  1027.  
  1028. function Reflect(direction, normal)
  1029. return direction - 2 * normal:Dot(direction) * normal
  1030. end
  1031.  
  1032. function ReflectShot(mouse)
  1033. local dir = (mouse.Hit.p - Torso.Position).unit
  1034. local tabl
  1035. local tablnum = 0
  1036. for i, v in pairs(lasrs) do
  1037. if not v[1] then
  1038. tabl = v
  1039. tablnum = i
  1040. break
  1041. end
  1042. end
  1043. if not tabl then
  1044. tablnum = #lasrs + 1
  1045. tabl = {false,nil,nil,0,0,1,{},{},{},{}}
  1046. for i = 1, 2 do
  1047. for j = 1, 6 do
  1048. local p = Instance.new("Part")
  1049. p.FormFactor = "Custom"
  1050. p.CanCollide = false
  1051. p.Anchored = true
  1052. p.Locked = true
  1053. p.BrickColor = BrickColor.new("New Yeller")
  1054. p.TopSurface = 10
  1055. p.BottomSurface = 10
  1056. p.RightSurface = 10
  1057. p.LeftSurface = 10
  1058. p.FrontSurface = 10
  1059. p.BackSurface = 10
  1060. p.Size = Vector3.new(1,1,1)
  1061. p.Material = "Neon"
  1062. p.Transparency = i == 1 and 0 or 0.6
  1063. p.Touched:connect(function(hit)
  1064. hit.Parent.Humanoid:TakeDamage(1)
  1065. end)
  1066. local mesh = Instance.new("CylinderMesh",p)
  1067. table.insert(tabl[6+i],p)
  1068. table.insert(tabl[8+i],mesh)
  1069. end
  1070. end
  1071. table.insert(lasrs,tabl)
  1072. end
  1073. -- isMoving,direction,lastPosition,rebounds,distance,recycleCount,middleLayer,outerLayer
  1074. tabl[4],tabl[5] = 0,0
  1075. tabl[3] = Barrel.Position
  1076. tabl[2] = dir
  1077. tabl[1] = true
  1078.  
  1079. end
  1080.  
  1081. local MultiShoot = false
  1082. local gun = false
  1083. local shoot = false
  1084. local Obliterate = false
  1085. local LaserMode = false
  1086. function Aim()
  1087. attack = true
  1088. gun = true
  1089. for i = 0, 1, 0.2 do
  1090. swait()
  1091. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .5)
  1092. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(0), math.rad(-90)), .5)
  1093. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.5)
  1094. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.5)
  1095. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .5)
  1096. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .5)
  1097. end
  1098. RootJoint.C0 = RootCF * cf(0, 0, 0) * euler(0, 0, 1.57)
  1099. RW.C0 = cf(1.5, 0.5, 0) * euler(1.57, 0, 1.57)
  1100. local gairo = Create("BodyGyro"){
  1101. Parent = RootPart,
  1102. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  1103. P = 20e+003 ,
  1104. cframe = RootPart.CFrame,
  1105. }
  1106. local offset = nil
  1107. while gun == true do
  1108. swait()
  1109. local gunpos = vt(mouse.Hit.p.x, Head.Position.Y, mouse.Hit.p.z)
  1110. offset = (Torso.Position.y - mouse.Hit.p.y) / 60
  1111. local mag = (Torso.Position - mouse.Hit.p).magnitude / 80
  1112. offset = offset / mag
  1113. gairo.cframe = cf(Head.Position, gunpos)
  1114. Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, -1.57), .3)
  1115. RW.C1 = clerp(RW.C1, cf(0, 0.5, 0) * euler(offset, 0, 0), .5)
  1116. end
  1117. if shoot == true then
  1118. gairo.Parent = nil
  1119. PE1.Enabled,PE2.Enabled = true,true
  1120. Lite.Enabled = true
  1121. for i = 0, 1, 0.1 do
  1122. swait()
  1123. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .3)
  1124. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(5), math.rad(-90)), .3)
  1125. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(50), math.rad(90)), 0.3)
  1126. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-40)), 0.3)
  1127. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .3)
  1128. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .3)
  1129. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(30), math.rad(0), math.rad(0)), .3)
  1130. end
  1131. Lite.Enabled = false
  1132. PE1.Enabled,PE2.Enabled = false,false
  1133. elseif MultiShoot == true then
  1134. gairo.Parent = nil
  1135. for i = 1,5 do
  1136. so("rbxassetid://199144089", Barrel, 1, 1.1)
  1137. Shoot(Barrel, .2, 1)
  1138. PE1.Enabled,PE2.Enabled = true,true
  1139. Lite.Enabled = true
  1140. for i = 0,1,1 do
  1141. swait()
  1142. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .5)
  1143. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(2), math.rad(-90)), .5)
  1144. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(50), math.rad(90)), 0.5)
  1145. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-40)), 0.5)
  1146. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .5)
  1147. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .5)
  1148. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(30), math.rad(0), math.rad(0)), .3)
  1149. end
  1150. PE1.Enabled,PE2.Enabled = false,false
  1151. Lite.Enabled = false
  1152. for i = 0,1,1 do
  1153. swait()
  1154. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .5)
  1155. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(0), math.rad(-90)), .5)
  1156. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.5)
  1157. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.5)
  1158. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .5)
  1159. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .5)
  1160. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1161. end
  1162. end
  1163. elseif LaserMode == true then
  1164. gairo.Parent = nil
  1165. so("rbxassetid://161006157", Barrel, 1, .9)
  1166. so("rbxassetid://161006131", Barrel, 1, 1.2)
  1167. for i = 1, 30 do
  1168. swait()
  1169. ChargeEffect(Barrel, 2, 2, 2, math.random(-10, 10), math.random(-10, 10), math.random(-10, 10), 0, 0, 0, BrickColor.new("New Yeller"))
  1170. end
  1171. so("rbxassetid://199144089", Barrel, 1, .8)
  1172. so("rbxassetid://199144089", Barrel, 1, .5)
  1173. Laser(Barrel)
  1174. PE1.Enabled,PE2.Enabled = true,true
  1175. Lite.Enabled = true
  1176. for i = 0, 1, 0.1 do
  1177. swait()
  1178. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .3)
  1179. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(5), math.rad(-90)), .3)
  1180. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(50), math.rad(90)), 0.3)
  1181. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-40)), 0.3)
  1182. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .3)
  1183. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .3)
  1184. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(30), math.rad(0), math.rad(0)), .3)
  1185. end
  1186. PE1.Enabled,PE2.Enabled = false,false
  1187. Lite.Enabled = false
  1188. elseif Obliterate == true then
  1189. gairo.Parent = nil
  1190. so("rbxassetid://161006157", Barrel, 1, .7)
  1191. so("rbxassetid://161006131", Barrel, 1, 1)
  1192. for i = 1, 60 do
  1193. swait()
  1194. ChargeEffect(Barrel, 2, 2, 2, math.random(-10, 10), math.random(-10, 10), math.random(-10, 10), 0, 0, 0, BrickColor.new("New Yeller"))
  1195. end
  1196. for i = 1, 5 do
  1197. so("rbxassetid://199144089", Barrel, 1, .8)
  1198. for i = 1, 5 do
  1199. Shoot(Barrel, 1, 3)
  1200. end
  1201. PE1.Enabled,PE2.Enabled = true,true
  1202. Lite.Enabled = true
  1203. for i = 0, 1, 0.2 do
  1204. swait()
  1205. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .5)
  1206. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(5), math.rad(-90)), .5)
  1207. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.8, 0) * angles(math.rad(90), math.rad(50), math.rad(90)), 0.5)
  1208. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-40)), 0.5)
  1209. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .5)
  1210. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .5)
  1211. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(30), math.rad(0), math.rad(0)), .3)
  1212. end
  1213. PE1.Enabled,PE2.Enabled = false,false
  1214. Lite.Enabled = false
  1215. for i = 0, 1, 0.2 do
  1216. swait()
  1217. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .3)
  1218. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(0), math.rad(-90)), .3)
  1219. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.3)
  1220. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.3)
  1221. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .3)
  1222. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .3)
  1223. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1224. end
  1225. end
  1226.  
  1227. for i = 0, 1, 0.1 do
  1228. swait()
  1229. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(50)), .3)
  1230. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(5), math.rad(-5), math.rad(-55)), .3)
  1231. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, -.5) * angles(math.rad(0), math.rad(130), math.rad(80)), 0.3)
  1232. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.3)
  1233. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .3)
  1234. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .3)
  1235. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .3)
  1236. end
  1237. so("rbxassetid://161006157", Barrel, 1, .9)
  1238. so("rbxassetid://161006131", Barrel, 1, 1.2)
  1239. for i = 1, 30 do
  1240. swait()
  1241. ChargeEffect(Barrel, 2, 2, 2, math.random(-10, 10), math.random(-10, 10), math.random(-10, 10), 0, 0, 0, BrickColor.new("New Yeller"))
  1242. end
  1243. for i = 0, 1, 0.05 do
  1244. swait()
  1245. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .3)
  1246. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(1), math.rad(-85)), .3)
  1247. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.3)
  1248. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.3)
  1249. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .3)
  1250. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .3)
  1251. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(20), math.rad(0), math.rad(0)), .3)
  1252. end
  1253. so("rbxassetid://199144089", Barrel, 1, .8)
  1254. so("rbxassetid://199144089", Barrel, 1, .9)
  1255. so("rbxassetid://199144089", Barrel, 1, .6)
  1256. for i = 1, 20 do
  1257. Shoot(Barrel, 1.5, 5)
  1258. end
  1259. PE1.Enabled,PE2.Enabled = true,true
  1260. Lite.Enabled = true
  1261. for i = 0, 1, 0.05 do
  1262. swait()
  1263. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .5)
  1264. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(10), math.rad(-90)), .5)
  1265. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.8, 0) * angles(math.rad(0), math.rad(50), math.rad(120)), 0.5)
  1266. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.5)
  1267. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .5)
  1268. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .5)
  1269. end
  1270. PE1.Enabled,PE2.Enabled = false,false
  1271. Lite.Enabled = false
  1272. end
  1273. gairo.Parent = nil
  1274. shoot = false
  1275. attack = false
  1276. end
  1277.  
  1278. mouse.Button1Down:connect(function()
  1279. if gun == true then
  1280. shoot = true
  1281. so("rbxassetid://199144089", Barrel, 1, 1)
  1282. Shoot(Barrel, 0, 0)
  1283. gun = false
  1284. end
  1285. end)
  1286. Bin=Instance.new("HopperBin",Player.Backpack)
  1287. function s(mouse)
  1288. Equip()
  1289. end
  1290. function ds(mouse)
  1291. Unequip()
  1292. end
  1293.  
  1294. Bin.Selected:connect(s)
  1295. Bin.Deselected:connect(ds)
  1296.  
  1297. mouse.KeyDown:connect(function(k)
  1298. k = k:lower()
  1299. --[[ if attack == false and equipped == false and k == 'e' then
  1300. Equip()
  1301. elseif attack == false and equipped == true and k == 'e' then
  1302. Unequip()]]
  1303. if attack == false and equipped == true and k == 'f' then
  1304. Aim()
  1305. elseif equipped == true and k == 'f' then
  1306. shoot = false
  1307. elseif equipped == true and gun == true and k == 'q' then
  1308. if mana >= 20 then mana=mana-20 else return end
  1309. shoot = true
  1310. so("rbxassetid://199144089", Barrel, 1, .8)
  1311. for i = 1, 5 do
  1312. Shoot(Barrel, 1, 3)
  1313. gun = false
  1314. end
  1315. elseif equipped == true and gun == true and k == 'e' then
  1316. if mana >= 30 then mana=mana-30 else return end
  1317. MultiShoot = true
  1318. gun = false
  1319. elseif equipped == true and gun == true and k == 'r' then
  1320. if mana >= 50 then mana=mana-50 else return end
  1321. MultiShoot = false
  1322. LaserMode = true
  1323. gun = false
  1324. elseif equipped == true and attack == true and gun == true and k == 't' then
  1325. if mana >= 70 then mana=mana-70 else return end
  1326. MultiShoot = false
  1327. Obliterate = true
  1328. LaserMode = false
  1329. gun = false
  1330. elseif equipped == true and attack == true and gun == true and k == 'g' then
  1331. if mana >= 30 then mana=mana-30 else return end
  1332. shoot = true
  1333. ReflectShot(mouse)
  1334. so("rbxassetid://199144089", Barrel, 1, .8)
  1335. so("rbxassetid://199144089", Barrel, 1, .5)
  1336. gun = false
  1337. end
  1338. end)
  1339.  
  1340. game:GetService("RunService").Stepped:connect(function()
  1341. for _, lasr in pairs(lasrs) do
  1342. for i, v in pairs(lasr[9]) do
  1343. if lasr[7][i].Parent then
  1344. v.Scale = v.Scale + Vector3.new(-0.1,0,-0.1)
  1345. lasr[10][i].Scale = lasr[10][i].Scale + Vector3.new(-0.1,0,-0.1)
  1346. if v.Scale.x < 0.1 then
  1347. lasr[7][i].Parent = nil
  1348. lasr[8][i].Parent = nil
  1349. end
  1350. end
  1351. end
  1352.  
  1353. if lasr[1] then
  1354. local hitz, enz = RAY(lasr[3],lasr[2]*lasrspd)
  1355. lasr[5] = lasr[5] + (lasr[3] - enz).magnitude
  1356.  
  1357. lasr[7][lasr[6]].Parent = m
  1358. lasr[7][lasr[6]].CFrame = CFrame.new((lasr[3] + enz)/2,enz) * CFrame.Angles(math.pi/2,0,0)
  1359. lasr[9][lasr[6]].Scale = Vector3.new(0.7,(lasr[3] - enz).magnitude*5,0.7)
  1360.  
  1361. lasr[8][lasr[6]].Parent = m
  1362. lasr[8][lasr[6]].CFrame = lasr[7][lasr[6]].CFrame
  1363. lasr[10][lasr[6]].Scale = Vector3.new(1.3,(lasr[3] - enz).magnitude*5 + 0.02,1.3)
  1364.  
  1365. lasr[3] = enz
  1366. lasr[6] = lasr[6]%#lasr[7] + 1
  1367.  
  1368. if hitz then
  1369. lasr[4] = lasr[4] + 1
  1370. if lasr[4] == maxRebounds then
  1371. lasr[1] = false
  1372. else
  1373. local norm = FindSurface(hitz,enz)
  1374. lasr[2] = Reflect(lasr[2],norm)
  1375. end
  1376. end
  1377. if lasr[5] > maxTravelDistance then
  1378. lasr[1] = false
  1379. end
  1380. end
  1381. end
  1382. end)
  1383.  
  1384. local sine = 0
  1385. local change = 1
  1386. local val = 0
  1387. local idle = 0
  1388. local donum = 0
  1389.  
  1390. while true do
  1391. swait()
  1392. sine = sine + change
  1393. -- mouse.Icon = "http://www.roblox.com/asset/?id=296383647"
  1394. local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1395. local velderp = RootPart.Velocity.y
  1396. hitfloor, posfloor = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  1397. if equipped == true then
  1398. if attack == false then
  1399. idle = idle + 1
  1400. else
  1401. idle = 0
  1402. end
  1403. if idle >= 500 then
  1404. if attack == false then
  1405. end
  1406. end
  1407. if donum >= .5 then
  1408. handidle = true
  1409. elseif donum <= 0 then
  1410. handidle = false
  1411. end
  1412. if handidle == false then
  1413. donum = donum + 0.003
  1414. else
  1415. donum = donum - 0.003
  1416. end
  1417. if RootPart.Velocity.y > 1 and hitfloor == nil then
  1418. Anim = "Jump"
  1419. if attack == false then
  1420. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .3)
  1421. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(10), math.rad(0), math.rad(0)), .3)
  1422. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(30)), 0.3)
  1423. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.3)
  1424. RH.C0 = clerp(RH.C0, cf(.05, -1.5, .5) * angles(math.rad(-20), math.rad(0), math.rad(5)), .3)
  1425. LH.C0 = clerp(LH.C0, cf(-.05, -1.5, .5) * angles(math.rad(-20), math.rad(0), math.rad(-5)), .3)
  1426. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1427. RW.C1 = clerp(RW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), .3)
  1428. end
  1429. elseif RootPart.Velocity.y < -1 and hitfloor == nil then
  1430. Anim = "Fall"
  1431. if attack == false then
  1432. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1433. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(20), math.rad(0), math.rad(0)), .3)
  1434. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(40)), 0.3)
  1435. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
  1436. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, -.2) * angles(math.rad(10), math.rad(0), math.rad(5)), .3)
  1437. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, -.2) * angles(math.rad(10), math.rad(0), math.rad(-5)), .3)
  1438. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1439. RW.C1 = clerp(RW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), .3)
  1440. end
  1441. elseif torvel < 1 and hitfloor ~= nil then
  1442. Anim = "Idle"
  1443. if attack == false then
  1444. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5) + donum / 3, math.rad(0), math.rad(30)), .3)
  1445. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(.5) - donum / 3, math.rad(.5) + donum / 3, math.rad(-30)), .3)
  1446. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(5) + donum / 2), 0.3)
  1447. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-5) + donum / 2, math.rad(0), math.rad(-10)), 0.3)
  1448. RH.C0 = clerp(RH.C0, cf(.2, -1.5, -.5) * angles(math.rad(5) + donum / 2, math.rad(-30), math.rad(5) + donum / 5), .3)
  1449. LH.C0 = clerp(LH.C0, cf(0, -1.5 - donum / 3.5, 0) * angles(math.rad(5) + donum / 3, math.rad(-10), math.rad(0)), .3)
  1450. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1451. RW.C1 = clerp(RW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), .3)
  1452. end
  1453. elseif torvel > 2 and hitfloor ~= nil then
  1454. Anim = "Walk"
  1455. if attack == false then
  1456. change = 3
  1457. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(20) + donum / 2, math.rad(0), math.rad(0)), .3)
  1458. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-10) - donum / 2, math.rad(0), math.rad(0)), .3)
  1459. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-50) + donum / 2, math.rad(0), math.rad(5) + donum / 2), 0.3)
  1460. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20) + donum / 2, math.rad(0), math.rad(-5) - donum / 2), 0.3)
  1461. RH.C0 = clerp(RH.C0, cf(0, -1.5, -.7 * math.cos(sine / 10)) * angles(math.rad(50 * math.cos(sine / 10)), math.rad(0), math.rad(3)), .3)
  1462. LH.C0 = clerp(LH.C0, cf(0, -1.5, .7 * math.cos(sine / 10)) * angles(math.rad(-50 * math.cos(sine / -10)), math.rad(0), math.rad(-3)), .3)
  1463. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1464. RW.C1 = clerp(RW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), .3)
  1465. end
  1466. end
  1467. end
  1468. if #Effects > 0 then
  1469. for e = 1, #Effects do
  1470. if Effects[e] ~= nil then
  1471. local Thing = Effects[e]
  1472. if Thing ~= nil then
  1473. local Part = Thing[1]
  1474. local Mode = Thing[2]
  1475. local Delay = Thing[3]
  1476. local IncX = Thing[4]
  1477. local IncY = Thing[5]
  1478. local IncZ = Thing[6]
  1479. if Thing[1].Transparency <= 1 then
  1480. if Thing[2] == "Block1" then
  1481. Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1482. Mesh = Thing[1].Mesh
  1483. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  1484. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1485. elseif Thing[2] == "Cylinder" then
  1486. Mesh = Thing[1].Mesh
  1487. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  1488. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1489. elseif Thing[2] == "Blood" then
  1490. Mesh = Thing[7]
  1491. Thing[1].CFrame = Thing[1].CFrame * cf(0, .5, 0)
  1492. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  1493. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1494. elseif Thing[2] == "Elec" then
  1495. Mesh = Thing[1].Mesh
  1496. Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9])
  1497. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1498. elseif Thing[2] == "Disappear" then
  1499. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1500. end
  1501. else
  1502. Part.Parent = nil
  1503. table.remove(Effects, e)
  1504. end
  1505. end
  1506. end
  1507. end
  1508. end
  1509. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement