seamty

Untitled

May 25th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 73.50 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126.  
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144.  
  145. Player = game.Players.LocalPlayer
  146. Character = Player.Character
  147. PlayerGui = Player.PlayerGui
  148. Backpack = Player.Backpack
  149. Torso = Character.Torso
  150. Head = Character.Head
  151. Humanoid = Character.Humanoid
  152. LeftArm = Character["Left Arm"]
  153. LeftLeg = Character["Left Leg"]
  154. RightArm = Character["Right Arm"]
  155. RightLeg = Character["Right Leg"]
  156. PlayerGui = Player.PlayerGui
  157. Backpack = Player.Backpack
  158. Torso = Character.Torso
  159. Head = Character.Head
  160. Humanoid = Character.Humanoid
  161. LeftArm = Character["Left Arm"]
  162. LeftLeg = Character["Left Leg"]
  163. RightArm = Character["Right Arm"]
  164. RightLeg = Character["Right Leg"]
  165. LS = Torso["Left Shoulder"]
  166. RS = Torso["Right Shoulder"]
  167. Neck = Torso.Neck
  168. attacktype = 1
  169. vt = Vector3.new
  170. cf = CFrame.new
  171. euler = CFrame.fromEulerAnglesXYZ
  172. angles = CFrame.Angles
  173. necko = cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  174. necko2 = cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  175. LHC0 = cf(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  176. LHC1 = cf(-0.5, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  177. RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  178. RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  179. RootPart = Character.HumanoidRootPart
  180. RootJoint = RootPart.RootJoint
  181. RootCF = euler(-1.57, 0, 3.14)
  182. attack = false
  183. equipped = false
  184. local Anim = "Idle"
  185. local Effects = {}
  186. cam = workspace.CurrentCamera
  187. ZTarget = nil
  188. RocketTarget = nil
  189. local RbxUtility = LoadLibrary("RbxUtility")
  190. local Create = RbxUtility.Create
  191. local m = Create("Model"){
  192. Parent = Character,
  193. Name = "WeaponModel",
  194. }
  195. mouse = Player:GetMouse()
  196. RSH = Torso["Right Shoulder"]
  197. LSH = Torso["Left Shoulder"]
  198. RHP = Character.Torso["Right Hip"]
  199. LHP = Character.Torso["Left Hip"]
  200.  
  201. function NoOutline(Part)
  202. Part.TopSurface, Part.BottomSurface, Part.LeftSurface, Part.RightSurface, Part.FrontSurface, Part.BackSurface = 10, 10, 10, 10, 10, 10
  203. end
  204. function swait(num)
  205. if num == 0 or num == nil then
  206. game:service'RunService'.Heartbeat:wait()
  207. else
  208. for i = 0, num do
  209. game:service'RunService'.Heartbeat:wait()
  210. end
  211. end
  212. end
  213.  
  214. function nooutline(part)
  215. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  216. end
  217.  
  218. function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
  219. local fp = Create("Part"){
  220. formFactor = formfactor,
  221. Parent = parent,
  222. Reflectance = reflectance,
  223. Transparency = transparency,
  224. CanCollide = false,
  225. Locked = true,
  226. BrickColor = BrickColor.new(tostring(brickcolor)),
  227. Name = name,
  228. Size = size,
  229. Position = Character.Torso.Position,
  230. Material = material,
  231. }
  232. nooutline(fp)
  233. return fp
  234. end
  235.  
  236. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  237. local Msh = Create(Mesh){
  238. Parent = part,
  239. Offset = offset,
  240. Scale = scale,
  241. }
  242. if Mesh == "SpecialMesh" then
  243. Msh.MeshType = meshtype
  244. Msh.MeshId = meshid
  245. end
  246. return Msh
  247. end
  248.  
  249. function weld(parent, part0, part1, c0, c1)
  250. local Weld = Create("Weld"){
  251. Parent = parent,
  252. Part0 = part0,
  253. Part1 = part1,
  254. C0 = c0,
  255. C1 = c1,
  256. }
  257. return Weld
  258. end
  259.  
  260.  
  261. local function CFrameFromTopBack(at, top, back)
  262. local right = top:Cross(back)
  263. return CFrame.new(at.x, at.y, at.z,
  264. right.x, top.x, back.x,
  265. right.y, top.y, back.y,
  266. right.z, top.z, back.z)
  267. end
  268.  
  269. function Triangle(a, b, c)
  270. local edg1 = (c - a):Dot((b - a).unit)
  271. local edg2 = (a - b):Dot((c - b).unit)
  272. local edg3 = (b - c):Dot((a - c).unit)
  273. if edg1 <= (b - a).magnitude and edg1 >= 0 then
  274. a, b, c = a, b, c
  275. elseif edg2 <= (c - b).magnitude and edg2 >= 0 then
  276. a, b, c = b, c, a
  277. elseif edg3 <= (a - c).magnitude and edg3 >= 0 then
  278. a, b, c = c, a, b
  279. else
  280. assert(false, "unreachable")
  281. end
  282.  
  283. local len1 = (c - a):Dot((b - a).unit)
  284. local len2 = (b - a).magnitude - len1
  285. local width = (a + (b - a).unit * len1 - c).magnitude
  286.  
  287. local maincf = CFrameFromTopBack(a, (b - a):Cross(c - b).unit, -(b - a).unit)
  288.  
  289. local list = {}
  290.  
  291. local Color = BrickColor.new("Dark stone grey")
  292.  
  293. if len1 > 0.01 then
  294. local w1 = Create('WedgePart', m){
  295. Material = "SmoothPlastic",
  296. FormFactor = 'Custom',
  297. BrickColor = Color,
  298. Transparency = 0,
  299. Reflectance = 0,
  300. Material = "SmoothPlastic",
  301. CanCollide = false,
  302. Anchored = true,
  303. Parent = workspace,
  304. Transparency = 0.3,
  305. }
  306. game:GetService("Debris"):AddItem(w1, 5)
  307. NoOutline(w1)
  308. local sz = Vector3.new(0.2, width, len1)
  309. w1.Size = sz
  310. local sp = Create("SpecialMesh"){
  311. Parent = w1,
  312. MeshType = "Wedge",
  313. Scale = Vector3.new(0, 1, 1) * sz / w1.Size,
  314. }
  315. w1:BreakJoints()
  316. table.insert(Effects, {
  317. w1,
  318. "Disappear",
  319. .03
  320. })
  321. w1.CFrame = maincf * CFrame.Angles(math.pi, 0, math.pi / 2) * CFrame.new(0, width / 2, len1 / 2)
  322. table.insert(list, w1)
  323. end
  324. if len2 > 0.01 then
  325. local w2 = Create('WedgePart', m){
  326. Material = "SmoothPlastic",
  327. FormFactor = 'Custom',
  328. BrickColor = Color,
  329. Transparency = 0,
  330. Reflectance = 0,
  331. Material = "SmoothPlastic",
  332. CanCollide = false,
  333. Anchored = true,
  334. Parent = workspace,
  335. Transparency = 0.3,
  336. }
  337. game:GetService("Debris"):AddItem(w2, 5)
  338. NoOutline(w2)
  339. local sz = Vector3.new(0.2, width, len2)
  340. w2.Size = sz
  341. local sp = Create("SpecialMesh"){
  342. Parent = w2,
  343. MeshType = "Wedge",
  344. Scale = Vector3.new(0, 1, 1) * sz / w2.Size,
  345. }
  346. w2:BreakJoints()
  347. table.insert(Effects, {
  348. w2,
  349. "Disappear",
  350. .03
  351. })
  352. w2.CFrame = maincf * CFrame.Angles(math.pi, math.pi, -math.pi / 2) * CFrame.new(0, width / 2, -len1 - len2 / 2)
  353. table.insert(list, w2)
  354. end
  355. return unpack(list)
  356. end
  357.  
  358. function so(id, par, vol, pit)
  359. coroutine.resume(coroutine.create(function()
  360. local sou = Instance.new("Sound", par or workspace)
  361. sou.Volume = vol
  362. sou.Pitch = pit or 1
  363. sou.SoundId = id
  364. swait()
  365. sou:play()
  366. swait(6)
  367. sou:Remove()
  368. end))
  369. end
  370.  
  371. function clerp(a, b, t)
  372.  
  373. local function QuaternionFromCFrame(cf)
  374. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  375. local trace = m00 + m11 + m22
  376. if trace > 0 then
  377. local s = math.sqrt(1 + trace)
  378. local recip = 0.5 / s
  379. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  380. else
  381. local i = 0
  382. if m11 > m00 then
  383. i = 1
  384. end
  385. if m22 > (i == 0 and m00 or m11) then
  386. i = 2
  387. end
  388. if i == 0 then
  389. local s = math.sqrt(m00 - m11 - m22 + 1)
  390. local recip = 0.5 / s
  391. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  392. elseif i == 1 then
  393. local s = math.sqrt(m11 - m22 - m00 + 1)
  394. local recip = 0.5 / s
  395. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  396. elseif i == 2 then
  397. local s = math.sqrt(m22 - m00 - m11 + 1)
  398. local recip = 0.5 / s
  399. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  400. end
  401. end
  402. end
  403.  
  404. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  405. local xs, ys, zs = x + x, y + y, z + z
  406. local wx, wy, wz = w * xs, w * ys, w * zs
  407. local xx = x * xs
  408. local xy = x * ys
  409. local xz = x * zs
  410. local yy = y * ys
  411. local yz = y * zs
  412. local zz = z * zs
  413. 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))
  414. end
  415.  
  416. local function QuaternionSlerp(a, b, t)
  417. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  418. local startInterp, finishInterp;
  419. if cosTheta >= 0.0001 then
  420. if (1 - cosTheta) > 0.0001 then
  421. local theta = math.acos(cosTheta)
  422. local invSinTheta = 1 / math.sin(theta)
  423. startInterp = math.sin((1 - t) * theta) * invSinTheta
  424. finishInterp = math.sin(t * theta) * invSinTheta
  425. else
  426. startInterp = 1 - t
  427. finishInterp = t
  428. end
  429. else
  430. if (1 + cosTheta) > 0.0001 then
  431. local theta = math.acos(-cosTheta)
  432. local invSinTheta = 1 / math.sin(theta)
  433. startInterp = math.sin((t - 1) * theta) * invSinTheta
  434. finishInterp = math.sin(t * theta) * invSinTheta
  435. else
  436. startInterp = t - 1
  437. finishInterp = t
  438. end
  439. end
  440. 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
  441. end
  442.  
  443. local qa = {
  444. QuaternionFromCFrame(a)
  445. }
  446. local qb = {
  447. QuaternionFromCFrame(b)
  448. }
  449. local ax, ay, az = a.x, a.y, a.z
  450. local bx, by, bz = b.x, b.y, b.z
  451.  
  452. local _t = 1 - t
  453. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  454. end
  455.  
  456. function rayCast(Pos, Dir, Max, Ignore)
  457. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  458. end
  459.  
  460. Damagefunc = function(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  461. if hit.Parent == nil then
  462. return
  463. end
  464. local h = hit.Parent:FindFirstChild("Humanoid")
  465. for _, v in pairs(hit.Parent:children()) do
  466. if v:IsA("Humanoid") then
  467. h = v
  468. end
  469. end
  470. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  471. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  472. if hit.Parent.DebounceHit.Value == true then
  473. return
  474. end
  475. end
  476. if h.MaxHealth >= math.huge then
  477. hit:BreakJoints()
  478. end
  479. local c = Create("ObjectValue"){
  480. Name = "creator",
  481. Value = game:service("Players").LocalPlayer,
  482. Parent = h,
  483. }
  484. game:GetService("Debris"):AddItem(c, .5)
  485. if HitSound ~= nil and HitPitch ~= nil then
  486. so(HitSound, hit, 1, HitPitch)
  487. end
  488. local Damage = math.random(minim, maxim)
  489. local blocked = false
  490. local block = hit.Parent:findFirstChild("Block")
  491. if block ~= nil then
  492. if block.className == "IntValue" then
  493. if block.Value > 0 then
  494. blocked = true
  495. block.Value = block.Value - 1
  496. print(block.Value)
  497. end
  498. end
  499. end
  500. if blocked == false then
  501. h.Health = h.Health - Damage
  502. 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)
  503. else
  504. h.Health = h.Health - (Damage / 2)
  505. 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)
  506. end
  507. if Type == "Knockdown" then
  508. local hum = hit.Parent.Humanoid
  509. hum.PlatformStand = true
  510. coroutine.resume(coroutine.create(function(HHumanoid)
  511. swait(1)
  512. HHumanoid.PlatformStand = false
  513. end), hum)
  514. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  515. local bodvol = Create("BodyVelocity"){
  516. velocity = angle * knockback,
  517. P = 5000,
  518. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  519. Parent = hit,
  520. }
  521. local rl = Create("BodyAngularVelocity"){
  522. P = 3000,
  523. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  524. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  525. Parent = hit,
  526. }
  527. game:GetService("Debris"):AddItem(bodvol, .5)
  528. game:GetService("Debris"):AddItem(rl, .5)
  529. elseif Type == "Normal" then
  530. local vp = Create("BodyVelocity"){
  531. P = 500,
  532. maxForce = Vector3.new(math.huge, 0, math.huge),
  533. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  534. }
  535. if knockback > 0 then
  536. vp.Parent = hit.Parent.Torso
  537. end
  538. game:GetService("Debris"):AddItem(vp, .5)
  539. elseif Type == "Up" then
  540. local bodyVelocity = Create("BodyVelocity"){
  541. velocity = vt(0, 20, 0),
  542. P = 5000,
  543. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  544. Parent = hit,
  545. }
  546. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  547. elseif Type == "Snare" then
  548. local bp = Create("BodyPosition"){
  549. P = 2000,
  550. D = 100,
  551. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  552. position = hit.Parent.Torso.Position,
  553. Parent = hit.Parent.Torso,
  554. }
  555. game:GetService("Debris"):AddItem(bp, 1)
  556. elseif Type == "Freeze" then
  557. local BodPos = Create("BodyPosition"){
  558. P = 50000,
  559. D = 1000,
  560. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  561. position = hit.Parent.Torso.Position,
  562. Parent = hit.Parent.Torso,
  563. }
  564. local BodGy = Create("BodyGyro") {
  565. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  566. P = 20e+003,
  567. Parent = hit.Parent.Torso,
  568. cframe = hit.Parent.Torso.CFrame,
  569. }
  570. hit.Parent.Torso.Anchored = true
  571. coroutine.resume(coroutine.create(function(Part)
  572. swait(1.5)
  573. Part.Anchored = false
  574. end), hit.Parent.Torso)
  575. game:GetService("Debris"):AddItem(BodPos, 3)
  576. game:GetService("Debris"):AddItem(BodGy, 3)
  577. end
  578. local debounce = Create("BoolValue"){
  579. Name = "DebounceHit",
  580. Parent = hit.Parent,
  581. Value = true,
  582. }
  583. game:GetService("Debris"):AddItem(debounce, Delay)
  584. c = Instance.new("ObjectValue")
  585. c.Name = "creator"
  586. c.Value = Player
  587. c.Parent = h
  588. game:GetService("Debris"):AddItem(c, .5)
  589. end
  590. end
  591.  
  592. function ShowDamage(Pos, Text, Time, Color, Color2)
  593. local Rate = (1 / 30)
  594. local Pos = (Pos or Vector3.new(0, 0, 0))
  595. local Text = (Text or "")
  596. local Time = (Time or 2)
  597. local Color = (Color or Color3.new(1, 0, 0))
  598. local EffectPart = part("Custom", workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", vt(0, 0, 0))
  599. EffectPart.Anchored = true
  600. local BillboardGui = Create("BillboardGui"){
  601. Size = UDim2.new(3, 0, 3, 0),
  602. Adornee = EffectPart,
  603. Parent = EffectPart,
  604. }
  605. local TextLabel = Create("TextLabel"){
  606. BackgroundTransparency = 1,
  607. Size = UDim2.new(1, 0, 1, 0),
  608. Text = Text,
  609. TextColor3 = Color,
  610. TextScaled = true,
  611. Font = Enum.Font.ArialBold,
  612. FontSize = Enum.FontSize.Size10,
  613. TextStrokeColor3 = Color2,
  614. TextStrokeTransparency = 0.8,
  615. Parent = BillboardGui,
  616. }
  617. game.Debris:AddItem(EffectPart, (Time + 0.1))
  618. EffectPart.Parent = game:GetService("Workspace")
  619. delay(0, function()
  620. local Frames = (Time / Rate)
  621. for Frame = 1, Frames do
  622. wait(Rate)
  623. local Percent = (Frame / Frames)
  624. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  625. TextLabel.TextTransparency = Percent
  626. end
  627. if EffectPart and EffectPart.Parent then
  628. EffectPart:Destroy()
  629. end
  630. end)
  631. end
  632.  
  633. Handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Handle",Vector3.new(0.280000031, 0.699999988, 0.280000001))
  634. 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))
  635. FakeHandle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","FakeHandle",Vector3.new(0.280000031, 0.699999988, 0.280000001))
  636. 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))
  637. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  638. 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))
  639. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  640. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.200000003, 0.420000017, 0.200000003))
  641. 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))
  642. 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))
  643. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.200000003, 0.200000003, 0.280000001))
  644. 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))
  645. 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))
  646. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.200000003, 0.420000017, 0.200000003))
  647. 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))
  648. 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))
  649. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.420000046, 0.280000061, 0.560000002))
  650. 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))
  651. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  652. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.280000031, 0.700000048, 0.280000001))
  653. 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))
  654. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000046, 0.28700006, 0.280000031))
  655. 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))
  656. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  657. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.287, 0.560000062, 0.200000003))
  658. 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))
  659. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.699999988))
  660. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.420000046, 0.280000061, 0.420000017))
  661. 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))
  662. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  663. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000046, 0.28700006, 0.280000031))
  664. 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))
  665. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  666. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.280000031, 0.420000046, 0.980000079))
  667. 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))
  668. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.280000001))
  669. 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))
  670. 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))
  671. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.280000031, 0.200000003, 0.560000062))
  672. 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))
  673. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  674. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000017, 0.420000017, 0.560000002))
  675. 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))
  676. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  677. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.280000061, 0.280000061, 0.280000031))
  678. 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))
  679. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  680. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.287, 0.840000033, 0.200000003))
  681. 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))
  682. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.699999988))
  683. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.287, 0.200000003, 0.560000002))
  684. 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))
  685. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  686. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.287, 0.427000016, 0.200000003))
  687. 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))
  688. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.699999988))
  689. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.420000017, 0.420000017, 0.280000031))
  690. 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))
  691. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  692. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.420000017, 0.280000001, 0.560000062))
  693. 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))
  694. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  695. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.280000031, 0.200000003, 0.200000003))
  696. 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))
  697. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 0.699999988))
  698. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000017, 0.560000002, 0.420000017))
  699. 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))
  700. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  701. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.280000031, 0.200000003, 0.200000003))
  702. 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))
  703. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 0.699999988))
  704. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.420000017, 0.560000062, 0.200000003))
  705. 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))
  706. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.699999988))
  707. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000017, 0.280000001, 0.420000017))
  708. 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))
  709. mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  710. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.280000031, 0.200000003, 0.560000002))
  711. 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))
  712. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  713. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.280000031, 0.200000003, 0.560000062))
  714. 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))
  715. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  716. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.280000031, 0.200000003, 0.200000003))
  717. 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))
  718. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 0.699999988))
  719. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  720. 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))
  721. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  722. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  723. 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))
  724. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  725. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  726. 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))
  727. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  728. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  729. 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))
  730. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  731. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  732. 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))
  733. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  734. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  735. 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))
  736. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 0.699999988, 0.699999988))
  737. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.231000006, 0.200000003, 0.280000031))
  738. 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))
  739. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  740. Barrel=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Barrel",Vector3.new(0.200000003, 0.200000003, 0.280000031))
  741. 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))
  742. mesh("CylinderMesh",Barrel,"","",Vector3.new(0, 0, 0),Vector3.new(0.945000052, 0.699999988, 1))
  743. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000017, 0.200000003, 0.280000031))
  744. 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))
  745. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  746. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000017, 0.200000003, 0.280000031))
  747. 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))
  748. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  749. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.420000017, 0.420000046, 0.280000031))
  750. 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))
  751. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  752. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.420000017, 0.280000061, 0.280000031))
  753. 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))
  754. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  755. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000017, 0.420000046, 0.200000003))
  756. 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))
  757. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.699999988))
  758. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.420000017, 0.560000062, 0.200000003))
  759. 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))
  760. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.699999988))
  761. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000046, 0.287, 0.420000017))
  762. 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))
  763. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  764. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.420000046, 0.287, 0.280000031))
  765. 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))
  766. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  767. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.420000017, 0.280000001, 0.560000062))
  768. 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))
  769. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  770. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.5,0,"New Yeller","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  771. 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))
  772. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.735000134, 0.699999988, 0.699999988))
  773. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.280000001, 0.200000003, 0.280000091))
  774. 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))
  775. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.699999988, 1))
  776. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.700000048, 0.200000003))
  777. 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))
  778. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 1, 0.699999988))
  779. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.699999988, 0.200000003))
  780. 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))
  781. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.699999988, 1, 0.699999988))
  782.  
  783. Handleweld.Part0 = LeftLeg
  784. Handleweld.C0 = angles(-2, 0, 0) * cf(-.5, 1.3, 1)
  785.  
  786. local PE1 = Create("ParticleEmitter"){
  787. Parent = Barrel,
  788. Color = ColorSequence.new(BrickColor.new("New Yeller").Color),
  789. Transparency = NumberSequence.new(0),
  790. Size = NumberSequence.new(.5),
  791. Texture = "rbxassetid://257430870",
  792. Lifetime = NumberRange.new(.1),
  793. Rate = 100,
  794. VelocitySpread = 180,
  795. Rotation = NumberRange.new(0),
  796. Speed = NumberRange.new(0),
  797. LightEmission = .6,
  798. LockedToPart = true,
  799. Enabled = false
  800. }
  801.  
  802. local PE2 = PE1:Clone()
  803. PE2.Size = NumberSequence.new(.7)
  804. PE2.LightEmission = 1
  805. PE2.Texture = "rbxassetid://87729590"
  806.  
  807. local Lite = Create("PointLight"){
  808. Parent = Barrel,
  809. Color = BrickColor.new("New Yeller").Color,
  810. Shadows = true,
  811. Range = 10,
  812. Brightness = 0.5,
  813. Enabled = false
  814. }
  815.  
  816. function Equip()
  817. attack = true
  818. equipped = true
  819. RSH.Parent = nil
  820. LSH.Parent = nil
  821.  
  822. RHP.Parent = nil
  823. LHP.Parent = nil
  824.  
  825. RW = Create("Weld"){
  826. Name = "Right Shoulder",
  827. Part0 = Torso ,
  828. C0 = cf(1.5, 0.5, 0),
  829. C1 = cf(0, 0.5, 0),
  830. Part1 = RightArm ,
  831. Parent = Torso ,
  832. }
  833.  
  834. LW = Create("Weld"){
  835. Name = "Left Shoulder",
  836. Part0 = Torso ,
  837. C0 = cf(-1.5, 0.5, 0),
  838. C1 = cf(0, 0.5, 0) ,
  839. Part1 = LeftArm ,
  840. Parent = Torso ,
  841. }
  842.  
  843. RH = Create("Weld"){
  844. Part0 = Torso,
  845. C0 = cf(0, -1.5, 0), --* euler(1.3, 0, -0.5)
  846. C1 = cf(-0.5, 0.5, 0) ,
  847. Part1 = Character["Right Leg"],
  848. Parent = Torso,
  849. }
  850.  
  851. LH = Create("Weld"){
  852. Part0 = Torso,
  853. C0 = cf(0, -1.5, 0), --* euler(1.3, 0, -0.5)
  854. C1 = cf(0.5, 0.5, 0) ,
  855. Part1 = Character["Left Leg"],
  856. Parent = Torso,
  857. }
  858.  
  859. for i = 0, 1, 0.1 do
  860. swait()
  861. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  862. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(30), math.rad(0), math.rad(30)), .3)
  863. RW.C0 = clerp(RW.C0, CFrame.new(0, 0.2, -.5) * angles(math.rad(20), math.rad(0), math.rad(-50)), 0.3)
  864. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-5), math.rad(0), math.rad(-10)), 0.3)
  865. RH.C0 = clerp(RH.C0, cf(0.03, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(2)), .3)
  866. LH.C0 = clerp(LH.C0, cf(-0.03, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-2)), .3)
  867. end
  868. Handleweld.Part0 = RightArm
  869. Handleweld.C0 = euler(0, 0, 0) * cf(0, 0, 0)
  870. attack = false
  871. end
  872.  
  873. function Unequip()
  874. equipped = false
  875. attack = true
  876. for i = 0, 1, 0.1 do
  877. swait()
  878. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  879. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(30), math.rad(0), math.rad(30)), .3)
  880. RW.C0 = clerp(RW.C0, CFrame.new(.5, 0.2, -.7) * angles(math.rad(20), math.rad(0), math.rad(-50)), 0.3)
  881. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-30)), 0.3)
  882. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(5)), .3)
  883. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .3)
  884. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) *euler(6*i,0,0), .5)
  885. end
  886. FakeHandleweld.C0 = angles(0, 0, 0) * cf(0, 0, 0)
  887. Handleweld.Part0 = LeftLeg
  888. Handleweld.C0 = angles(-2, 0, 0) * cf(-.5, 1.3, 1)
  889. RW.Parent = nil
  890. LW.Parent = nil
  891. RH.Parent = nil
  892. LH.Parent = nil
  893. RSH.Parent = Torso
  894. LSH.Parent = Torso
  895. RHP.Parent = Torso
  896. LHP.Parent = Torso
  897. Torso.Neck.C0 = necko
  898. RootJoint.C0 = RootCF
  899. RW.C0 = cf(1.5, 0.5, 0) * euler(0, 0, 0)
  900. RW.C1 = cf(0, 0.5, 0) * euler(0, 0, 0)
  901. LW.C0 = cf(-1.5, 0.5, 0) * euler(0, 0, 0)
  902. LW.C1 = cf(0, 0.5, 0) * euler(0, 0, 0)
  903. attack = false
  904. end
  905.  
  906. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  907. local prt = part(3, Character, "Neon", 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2))
  908. prt.Anchored = true
  909. prt.CFrame = cframe
  910. local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  911. game:GetService("Debris"):AddItem(prt, 5)
  912. Effects[#Effects + 1] = {
  913. prt,
  914. "Cylinder",
  915. delay,
  916. x3,
  917. y3,
  918. z3
  919. } --part, type, delay
  920. end
  921.  
  922. function MagnitudeDamage(Hit, Part, magni, mindam, maxdam, knock, Type)
  923. for _, c in pairs(workspace:children()) do
  924. local hum = c:findFirstChild("Humanoid")
  925. if hum ~= nil then
  926. local head = c:findFirstChild("Torso")
  927. if head ~= nil then
  928. local targ = head.Position - Part.Position
  929. local mag = targ.magnitude
  930. if mag <= magni and c.Name ~= Player.Name then
  931. Damagefunc(Hit, head, mindam, maxdam, knock, Type, RootPart, 0, "rbxassetid://199149186", 1)
  932. end
  933. end
  934. end
  935. end
  936. end
  937.  
  938. RailgunTarget = RootPart
  939. function Laser(asd)
  940. local MouseLook=cf((asd.Position+mouse.Hit.p)/2,mouse.Hit.p)
  941. local hit,pos = rayCast(asd.Position,MouseLook.lookVector,999,RailgunTarget.Parent)
  942. local mag=(asd.Position-pos).magnitude
  943. 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)
  944. CylinderEffect(BrickColor.new("Institutional white"),CFrame.new((asd.Position+pos)/2,pos)*angles(1.57,0,0),1,mag*5,.5,1,0,.5,0.1)
  945. if hit~=nil then
  946. local ref=part(3,workspace,"SmoothPlastic",0,1,BrickColor.new("New Yeller"),"Reference",vt())
  947. ref.Anchored=true
  948. ref.CFrame=cf(pos)
  949. game:GetService("Debris"):AddItem(ref,1)
  950. Damagefunc(ref,hit,20,90,0,"Normal",RootPart,0)
  951. end
  952. end
  953.  
  954. RocketTarget = RootPart
  955. function Shoot(asd, spread1, spread2)
  956. local MainPos = asd.Position
  957. local MainPos2 = mouse.Hit.p
  958. 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
  959. local MouseLook = cf((MainPos + MainPos2) / 2, MainPos2 + spread)
  960. num = 30
  961. coroutine.resume(coroutine.create(function(Spreaded)
  962. repeat
  963. wait()
  964. local hit, pos = rayCast(MainPos, MouseLook.lookVector, 10, RocketTarget.Parent)
  965. local TheHit = mouse.Hit.p
  966. local mag = (MainPos - pos).magnitude
  967. 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)
  968. MainPos = MainPos + (MouseLook.lookVector * 10)
  969. num = num - 1
  970. if hit ~= nil then
  971. num = 0
  972. local ref = part(3, workspace, "Neon", 0, 1, BrickColor.new("New Yeller"), "Reference", vt())
  973. ref.Anchored = true
  974. ref.CFrame = cf(pos)
  975. MagnitudeDamage(ref, hit, 5, 10, 20, 1, "Normal")
  976. game:GetService("Debris"):AddItem(ref, 5)
  977. end
  978. until num <= 0
  979. end))
  980. end
  981.  
  982. function ChargeEffect(part, x1, y1, z1, x2, y2, z2, x3, y3, z3, color)
  983. local S = Create("Part"){
  984. Material = "SmoothPlastic",
  985. Name = "Effect",
  986. formFactor = 0,
  987. Size = vt(x1, y1, z1),
  988. BrickColor = color,
  989. Reflectance = 0,
  990. TopSurface = 0,
  991. BottomSurface = 0,
  992. Transparency = 0,
  993. Anchored = false,
  994. CanCollide = false,
  995. Material = "Neon",
  996. CFrame = part.CFrame * cf(x2, y2, z2) * euler(x3, y3, z3),
  997. Parent = m,
  998. }
  999. local msh1 = Create("SpecialMesh"){
  1000. Scale = vt(0.5, 0.5, 0.5) ,
  1001. MeshType = "Sphere",
  1002. Parent = S,
  1003. }
  1004. coroutine.resume(coroutine.create(function(Part, CF)
  1005. local f = Instance.new("BodyPosition")
  1006. f.P = 800
  1007. f.D = 100
  1008. f.maxForce = vt(math.huge, math.huge, math.huge)
  1009. f.position = part.Position
  1010. f.Parent = Part
  1011. for i = 0, 1, 0.1 do
  1012. wait()
  1013. Part.Transparency = Part.Transparency + 0.1
  1014. end
  1015. Part.Parent = nil
  1016. end), S, S.CFrame)
  1017. end
  1018.  
  1019. local lasrs = {}
  1020. local lasrspd = 3
  1021. local maxTravelDistance = 500
  1022. local maxRebounds = 20
  1023.  
  1024. function RAY(pos, dir, collidedlist, startpos, endpos, distleft)
  1025. collidedlist = collidedlist or {Character}
  1026. startpos = startpos or pos
  1027. distleft = distleft or dir.unit * dir.magnitude
  1028. endpos = endpos or pos + distleft
  1029. local ray = Ray.new(pos, distleft)
  1030. local hitz,enz = workspace:FindPartOnRayWithIgnoreList(ray, collidedlist)
  1031. if hitz ~= nil and not hitz.Parent:findFirstChild("Humanoid") then
  1032. if hitz.CanCollide == false then
  1033. table.insert(collidedlist, hitz)
  1034. local newpos = enz
  1035. local newdistleft = distleft - (dir.unit * (pos - newpos).magnitude)
  1036. if newdistleft then
  1037. return RAY(newpos-(dir*0.01), dir, collidedlist, startpos, endpos, newdistleft+(dir*0.01))
  1038. end
  1039. end
  1040. end
  1041. return hitz, enz, ray
  1042. end
  1043.  
  1044. function FindSurface(part, position)
  1045. local obj = part.CFrame:pointToObjectSpace(position)
  1046. local siz = part.Size/2
  1047. so("rbxassetid://199144144", workspace, 1, .9)
  1048. for i,v in pairs(Enum.NormalId:GetEnumItems()) do
  1049. local vec = Vector3.FromNormalId(v)
  1050. local wvec = part.CFrame:vectorToWorldSpace(vec)
  1051. local vz = (obj)/(siz*vec)
  1052. 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
  1053. return wvec,vec
  1054. end
  1055. end
  1056. if part.className == "WedgePart" then
  1057. local pos = (part.CFrame * CFrame.new(0,part.Size.y/2,part.Size.z/2)).p
  1058. 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
  1059. local wvec,vec = (apos - part.Position).unit, part.CFrame:pointToObjectSpace(apos)
  1060. return wvec,vec
  1061. elseif part.className == "Part" and (part.Shape.Name == "Ball" or part.Shape.Name == "Cylinder") then
  1062. return (position - part.Position).unit, part.CFrame:vectorToObjectSpace((position - part.Position).unit)
  1063. end
  1064. end
  1065.  
  1066. function Reflect(direction, normal)
  1067. return direction - 2 * normal:Dot(direction) * normal
  1068. end
  1069.  
  1070. function ReflectShot(mouse)
  1071. local dir = (mouse.Hit.p - Torso.Position).unit
  1072. local tabl
  1073. local tablnum = 0
  1074. for i, v in pairs(lasrs) do
  1075. if not v[1] then
  1076. tabl = v
  1077. tablnum = i
  1078. break
  1079. end
  1080. end
  1081. if not tabl then
  1082. tablnum = #lasrs + 1
  1083. tabl = {false,nil,nil,0,0,1,{},{},{},{}}
  1084. for i = 1, 2 do
  1085. for j = 1, 6 do
  1086. local p = Instance.new("Part")
  1087. p.FormFactor = "Custom"
  1088. p.CanCollide = false
  1089. p.Anchored = true
  1090. p.Locked = true
  1091. p.BrickColor = BrickColor.new("New Yeller")
  1092. p.TopSurface = 10
  1093. p.BottomSurface = 10
  1094. p.RightSurface = 10
  1095. p.LeftSurface = 10
  1096. p.FrontSurface = 10
  1097. p.BackSurface = 10
  1098. p.Size = Vector3.new(1,1,1)
  1099. p.Material = "Neon"
  1100. p.Transparency = i == 1 and 0 or 0.6
  1101. p.Touched:connect(function(hit)
  1102. hit.Parent.Humanoid:TakeDamage(30)
  1103. end)
  1104. local mesh = Instance.new("CylinderMesh",p)
  1105. table.insert(tabl[6+i],p)
  1106. table.insert(tabl[8+i],mesh)
  1107. end
  1108. end
  1109. table.insert(lasrs,tabl)
  1110. end
  1111. -- isMoving,direction,lastPosition,rebounds,distance,recycleCount,middleLayer,outerLayer
  1112. tabl[4],tabl[5] = 0,0
  1113. tabl[3] = Barrel.Position
  1114. tabl[2] = dir
  1115. tabl[1] = true
  1116.  
  1117. end
  1118.  
  1119. local MultiShoot = false
  1120. local gun = false
  1121. local shoot = false
  1122. local Obliterate = false
  1123. local LaserMode = false
  1124. function Aim()
  1125. attack = true
  1126. gun = true
  1127. for i = 0, 1, 0.2 do
  1128. swait()
  1129. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .5)
  1130. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(0), math.rad(-90)), .5)
  1131. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.5)
  1132. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.5)
  1133. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .5)
  1134. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .5)
  1135. end
  1136. RootJoint.C0 = RootCF * cf(0, 0, 0) * euler(0, 0, 1.57)
  1137. RW.C0 = cf(1.5, 0.5, 0) * euler(1.57, 0, 1.57)
  1138. local gairo = Create("BodyGyro"){
  1139. Parent = RootPart,
  1140. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  1141. P = 20e+003 ,
  1142. cframe = RootPart.CFrame,
  1143. }
  1144. local offset = nil
  1145. while gun == true do
  1146. swait()
  1147. local gunpos = vt(mouse.Hit.p.x, Head.Position.Y, mouse.Hit.p.z)
  1148. offset = (Torso.Position.y - mouse.Hit.p.y) / 60
  1149. local mag = (Torso.Position - mouse.Hit.p).magnitude / 80
  1150. offset = offset / mag
  1151. gairo.cframe = cf(Head.Position, gunpos)
  1152. Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, -1.57), .3)
  1153. RW.C1 = clerp(RW.C1, cf(0, 0.5, 0) * euler(offset, 0, 0), .5)
  1154. end
  1155. if shoot == true then
  1156. gairo.Parent = nil
  1157. PE1.Enabled,PE2.Enabled = true,true
  1158. Lite.Enabled = true
  1159. for i = 0, 1, 0.1 do
  1160. swait()
  1161. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .3)
  1162. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(5), math.rad(-90)), .3)
  1163. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(50), math.rad(90)), 0.3)
  1164. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-40)), 0.3)
  1165. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .3)
  1166. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .3)
  1167. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(30), math.rad(0), math.rad(0)), .3)
  1168. end
  1169. Lite.Enabled = false
  1170. PE1.Enabled,PE2.Enabled = false,false
  1171. elseif MultiShoot == true then
  1172. gairo.Parent = nil
  1173. for i = 1,5 do
  1174. so("rbxassetid://199144089", Barrel, 1, 1.1)
  1175. Shoot(Barrel, .2, 1)
  1176. PE1.Enabled,PE2.Enabled = true,true
  1177. Lite.Enabled = true
  1178. for i = 0,1,1 do
  1179. swait()
  1180. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .5)
  1181. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(2), math.rad(-90)), .5)
  1182. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(50), math.rad(90)), 0.5)
  1183. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-40)), 0.5)
  1184. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .5)
  1185. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .5)
  1186. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(30), math.rad(0), math.rad(0)), .3)
  1187. end
  1188. PE1.Enabled,PE2.Enabled = false,false
  1189. Lite.Enabled = false
  1190. for i = 0,1,1 do
  1191. swait()
  1192. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .5)
  1193. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(0), math.rad(-90)), .5)
  1194. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.5)
  1195. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.5)
  1196. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .5)
  1197. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .5)
  1198. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1199. end
  1200. end
  1201. elseif LaserMode == true then
  1202. gairo.Parent = nil
  1203. so("rbxassetid://161006157", Barrel, 1, .9)
  1204. so("rbxassetid://161006131", Barrel, 1, 1.2)
  1205. for i = 1, 30 do
  1206. swait()
  1207. ChargeEffect(Barrel, 2, 2, 2, math.random(-10, 10), math.random(-10, 10), math.random(-10, 10), 0, 0, 0, BrickColor.new("New Yeller"))
  1208. end
  1209. so("rbxassetid://199144089", Barrel, 1, .8)
  1210. so("rbxassetid://199144089", Barrel, 1, .5)
  1211. Laser(Barrel)
  1212. PE1.Enabled,PE2.Enabled = true,true
  1213. Lite.Enabled = true
  1214. for i = 0, 1, 0.1 do
  1215. swait()
  1216. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .3)
  1217. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(5), math.rad(-90)), .3)
  1218. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(50), math.rad(90)), 0.3)
  1219. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-40)), 0.3)
  1220. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .3)
  1221. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .3)
  1222. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(30), math.rad(0), math.rad(0)), .3)
  1223. end
  1224. PE1.Enabled,PE2.Enabled = false,false
  1225. Lite.Enabled = false
  1226. elseif Obliterate == true then
  1227. gairo.Parent = nil
  1228. so("rbxassetid://161006157", Barrel, 1, .7)
  1229. so("rbxassetid://161006131", Barrel, 1, 1)
  1230. for i = 1, 60 do
  1231. swait()
  1232. ChargeEffect(Barrel, 2, 2, 2, math.random(-10, 10), math.random(-10, 10), math.random(-10, 10), 0, 0, 0, BrickColor.new("New Yeller"))
  1233. end
  1234. for i = 1, 5 do
  1235. so("rbxassetid://199144089", Barrel, 1, .8)
  1236. for i = 1, 5 do
  1237. Shoot(Barrel, 1, 3)
  1238. end
  1239. PE1.Enabled,PE2.Enabled = true,true
  1240. Lite.Enabled = true
  1241. for i = 0, 1, 0.2 do
  1242. swait()
  1243. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .5)
  1244. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(5), math.rad(-90)), .5)
  1245. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.8, 0) * angles(math.rad(90), math.rad(50), math.rad(90)), 0.5)
  1246. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-40)), 0.5)
  1247. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .5)
  1248. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .5)
  1249. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(30), math.rad(0), math.rad(0)), .3)
  1250. end
  1251. PE1.Enabled,PE2.Enabled = false,false
  1252. Lite.Enabled = false
  1253. for i = 0, 1, 0.2 do
  1254. swait()
  1255. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .3)
  1256. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(0), math.rad(-90)), .3)
  1257. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.3)
  1258. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.3)
  1259. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .3)
  1260. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .3)
  1261. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1262. end
  1263. end
  1264.  
  1265. for i = 0, 1, 0.1 do
  1266. swait()
  1267. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(50)), .3)
  1268. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(5), math.rad(-5), math.rad(-55)), .3)
  1269. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, -.5) * angles(math.rad(0), math.rad(130), math.rad(80)), 0.3)
  1270. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.3)
  1271. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .3)
  1272. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .3)
  1273. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .3)
  1274. end
  1275. so("rbxassetid://161006157", Barrel, 1, .9)
  1276. so("rbxassetid://161006131", Barrel, 1, 1.2)
  1277. for i = 1, 30 do
  1278. swait()
  1279. ChargeEffect(Barrel, 2, 2, 2, math.random(-10, 10), math.random(-10, 10), math.random(-10, 10), 0, 0, 0, BrickColor.new("New Yeller"))
  1280. end
  1281. for i = 0, 1, 0.05 do
  1282. swait()
  1283. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .3)
  1284. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(1), math.rad(-85)), .3)
  1285. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.3)
  1286. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.3)
  1287. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .3)
  1288. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .3)
  1289. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(20), math.rad(0), math.rad(0)), .3)
  1290. end
  1291. so("rbxassetid://199144089", Barrel, 1, .8)
  1292. so("rbxassetid://199144089", Barrel, 1, .9)
  1293. so("rbxassetid://199144089", Barrel, 1, .6)
  1294. for i = 1, 20 do
  1295. Shoot(Barrel, 1.5, 5)
  1296. end
  1297. PE1.Enabled,PE2.Enabled = true,true
  1298. Lite.Enabled = true
  1299. for i = 0, 1, 0.05 do
  1300. swait()
  1301. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), .5)
  1302. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(10), math.rad(-90)), .5)
  1303. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.8, 0) * angles(math.rad(0), math.rad(50), math.rad(120)), 0.5)
  1304. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.5)
  1305. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, 0) * angles(math.rad(5), math.rad(0), math.rad(5)), .5)
  1306. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5)), .5)
  1307. end
  1308. PE1.Enabled,PE2.Enabled = false,false
  1309. Lite.Enabled = false
  1310. end
  1311. gairo.Parent = nil
  1312. shoot = false
  1313. attack = false
  1314. end
  1315.  
  1316. mouse.Button1Down:connect(function()
  1317. if gun == true then
  1318. shoot = true
  1319. so("rbxassetid://199144089", Barrel, 1, 1)
  1320. Shoot(Barrel, 0, 0)
  1321. gun = false
  1322. end
  1323. end)
  1324.  
  1325.  
  1326.  
  1327. mouse.KeyDown:connect(function(k)
  1328. k = k:lower()
  1329. if attack == false and equipped == false and k == 'e' then
  1330. Equip()
  1331. elseif attack == false and equipped == true and k == 'e' then
  1332. Unequip()
  1333. elseif attack == false and equipped == true and k == 'f' then
  1334. Aim()
  1335. elseif equipped == true and k == 'f' then
  1336. shoot = false
  1337. elseif equipped == true and gun == true and k == 'q' then
  1338. shoot = true
  1339. so("rbxassetid://199144089", Barrel, 1, .8)
  1340. for i = 1, 5 do
  1341. Shoot(Barrel, 1, 3)
  1342. gun = false
  1343. end
  1344. elseif equipped == true and gun == true and k == 'e' then
  1345. MultiShoot = true
  1346. gun = false
  1347. elseif equipped == true and gun == true and k == 'r' then
  1348. MultiShoot = false
  1349. LaserMode = true
  1350. gun = false
  1351. elseif equipped == true and attack == true and gun == true and k == 't' then
  1352. MultiShoot = false
  1353. Obliterate = true
  1354. LaserMode = false
  1355. gun = false
  1356. elseif equipped == true and attack == true and gun == true and k == 'g' then
  1357. shoot = true
  1358. ReflectShot(mouse)
  1359. so("rbxassetid://199144089", Barrel, 1, .8)
  1360. so("rbxassetid://199144089", Barrel, 1, .5)
  1361. gun = false
  1362. end
  1363. end)
  1364.  
  1365. game:GetService("RunService").Stepped:connect(function()
  1366. for _, lasr in pairs(lasrs) do
  1367. for i, v in pairs(lasr[9]) do
  1368. if lasr[7][i].Parent then
  1369. v.Scale = v.Scale + Vector3.new(-0.1,0,-0.1)
  1370. lasr[10][i].Scale = lasr[10][i].Scale + Vector3.new(-0.1,0,-0.1)
  1371. if v.Scale.x < 0.1 then
  1372. lasr[7][i].Parent = nil
  1373. lasr[8][i].Parent = nil
  1374. end
  1375. end
  1376. end
  1377.  
  1378. if lasr[1] then
  1379. local hitz, enz = RAY(lasr[3],lasr[2]*lasrspd)
  1380. lasr[5] = lasr[5] + (lasr[3] - enz).magnitude
  1381.  
  1382. lasr[7][lasr[6]].Parent = m
  1383. lasr[7][lasr[6]].CFrame = CFrame.new((lasr[3] + enz)/2,enz) * CFrame.Angles(math.pi/2,0,0)
  1384. lasr[9][lasr[6]].Scale = Vector3.new(0.7,(lasr[3] - enz).magnitude*5,0.7)
  1385.  
  1386. lasr[8][lasr[6]].Parent = m
  1387. lasr[8][lasr[6]].CFrame = lasr[7][lasr[6]].CFrame
  1388. lasr[10][lasr[6]].Scale = Vector3.new(1.3,(lasr[3] - enz).magnitude*5 + 0.02,1.3)
  1389.  
  1390. lasr[3] = enz
  1391. lasr[6] = lasr[6]%#lasr[7] + 1
  1392.  
  1393. if hitz then
  1394. lasr[4] = lasr[4] + 1
  1395. if lasr[4] == maxRebounds then
  1396. lasr[1] = false
  1397. else
  1398. local norm = FindSurface(hitz,enz)
  1399. lasr[2] = Reflect(lasr[2],norm)
  1400. end
  1401. end
  1402. if lasr[5] > maxTravelDistance then
  1403. lasr[1] = false
  1404. end
  1405. end
  1406. end
  1407. end)
  1408.  
  1409. local sine = 0
  1410. local change = 1
  1411. local val = 0
  1412. local idle = 0
  1413. local donum = 0
  1414.  
  1415. while true do
  1416. swait()
  1417. sine = sine + change
  1418. mouse.Icon = "http://www.roblox.com/asset/?id=296383647"
  1419. local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1420. local velderp = RootPart.Velocity.y
  1421. hitfloor, posfloor = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  1422. if equipped == true then
  1423. if attack == false then
  1424. idle = idle + 1
  1425. else
  1426. idle = 0
  1427. end
  1428. if idle >= 500 then
  1429. if attack == false then
  1430. end
  1431. end
  1432. if donum >= .5 then
  1433. handidle = true
  1434. elseif donum <= 0 then
  1435. handidle = false
  1436. end
  1437. if handidle == false then
  1438. donum = donum + 0.003
  1439. else
  1440. donum = donum - 0.003
  1441. end
  1442. if RootPart.Velocity.y > 1 and hitfloor == nil then
  1443. Anim = "Jump"
  1444. if attack == false then
  1445. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .3)
  1446. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(10), math.rad(0), math.rad(0)), .3)
  1447. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(30)), 0.3)
  1448. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-20)), 0.3)
  1449. RH.C0 = clerp(RH.C0, cf(.05, -1.5, .5) * angles(math.rad(-20), math.rad(0), math.rad(5)), .3)
  1450. LH.C0 = clerp(LH.C0, cf(-.05, -1.5, .5) * angles(math.rad(-20), math.rad(0), math.rad(-5)), .3)
  1451. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1452. RW.C1 = clerp(RW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), .3)
  1453. end
  1454. elseif RootPart.Velocity.y < -1 and hitfloor == nil then
  1455. Anim = "Fall"
  1456. if attack == false then
  1457. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1458. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(20), math.rad(0), math.rad(0)), .3)
  1459. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(40)), 0.3)
  1460. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
  1461. RH.C0 = clerp(RH.C0, cf(0.05, -1.5, -.2) * angles(math.rad(10), math.rad(0), math.rad(5)), .3)
  1462. LH.C0 = clerp(LH.C0, cf(-0.05, -1.5, -.2) * angles(math.rad(10), math.rad(0), math.rad(-5)), .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. elseif torvel < 1 and hitfloor ~= nil then
  1467. Anim = "Idle"
  1468. if attack == false then
  1469. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5) + donum / 3, math.rad(0), math.rad(30)), .3)
  1470. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(.5) - donum / 3, math.rad(.5) + donum / 3, math.rad(-30)), .3)
  1471. 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)
  1472. 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)
  1473. 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)
  1474. 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)
  1475. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1476. RW.C1 = clerp(RW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), .3)
  1477. end
  1478. elseif torvel > 2 and hitfloor ~= nil then
  1479. Anim = "Walk"
  1480. if attack == false then
  1481. change = 3
  1482. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(20) + donum / 2, math.rad(0), math.rad(0)), .3)
  1483. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-10) - donum / 2, math.rad(0), math.rad(0)), .3)
  1484. 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)
  1485. 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)
  1486. LH.C0 = clerp(LH.C0, CFrame.new(0, -1.5-0.3*math.cos(sine/10)/2, -.05 + math.sin(sine/10)/2) * CFrame.Angles(math.rad(3) + -math.sin(sine/10)/2.3, math.rad(0), math.rad(-3)), .4)
  1487. RH.C0 = clerp(RH.C0, CFrame.new(0, -1.5+0.3*math.cos(sine/10)/2, -.05 + -math.sin(sine/10)/2) * CFrame.Angles(math.rad(3) + math.sin(sine/10)/2.3, math.rad(0), math.rad(3)), .4)
  1488. FakeHandleweld.C0 = clerp(FakeHandleweld.C0, cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1489. RW.C1 = clerp(RW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), .3)
  1490. end
  1491. end
  1492. end
  1493. if #Effects > 0 then
  1494. for e = 1, #Effects do
  1495. if Effects[e] ~= nil then
  1496. local Thing = Effects[e]
  1497. if Thing ~= nil then
  1498. local Part = Thing[1]
  1499. local Mode = Thing[2]
  1500. local Delay = Thing[3]
  1501. local IncX = Thing[4]
  1502. local IncY = Thing[5]
  1503. local IncZ = Thing[6]
  1504. if Thing[1].Transparency <= 1 then
  1505. if Thing[2] == "Block1" then
  1506. Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1507. Mesh = Thing[1].Mesh
  1508. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  1509. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1510. elseif Thing[2] == "Cylinder" then
  1511. Mesh = Thing[1].Mesh
  1512. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  1513. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1514. elseif Thing[2] == "Blood" then
  1515. Mesh = Thing[7]
  1516. Thing[1].CFrame = Thing[1].CFrame * cf(0, .5, 0)
  1517. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  1518. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1519. elseif Thing[2] == "Elec" then
  1520. Mesh = Thing[1].Mesh
  1521. Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9])
  1522. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1523. elseif Thing[2] == "Disappear" then
  1524. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1525. end
  1526. else
  1527. Part.Parent = nil
  1528. table.remove(Effects, e)
  1529. end
  1530. end
  1531. end
  1532. end
  1533. end
  1534. end
Advertisement
Add Comment
Please, Sign In to add comment