Advertisement
Scorpion2

Snipershrek

Sep 27th, 2017
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.61 KB | None | 0 0
  1. --[[Created by PointCoded and dylanjenner13]]--
  2. --[[Credits to the respectable owners for different functions and work]]--
  3.  
  4. wait(1 / 60)
  5. Effects = { }
  6. local Player = game.Players.localPlayer
  7. local PGui = Player:findFirstChild("PlayerGui")
  8. local Character = Player.Character
  9. local Humanoid = Character.Humanoid
  10. Humanoid.WalkSpeed = 25
  11. local mouse = Player:GetMouse()
  12. local m = Instance.new('Model', Character)
  13. m.Name = "WeaponModel"
  14. local LeftArm = Character["Left Arm"]
  15. local RightArm = Character["Right Arm"]
  16. local LeftLeg = Character["Left Leg"]
  17. local RightLeg = Character["Right Leg"]
  18. local Head = Character.Head
  19. local Torso = Character.Torso
  20. local cam = game.Workspace.CurrentCamera
  21. local RootPart = Character.HumanoidRootPart
  22. local RootJoint = RootPart.RootJoint
  23. local equipped = false
  24. local attack = false
  25. local Anim = 'Idle'
  26. local idle = 0
  27. local attacktype = 1
  28. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  29. local velocity = RootPart.Velocity.y
  30. local sine = 0
  31. local change = 1
  32. local grabbed = false
  33. local cn = CFrame.new
  34. local mr = math.rad
  35. local angles = CFrame.Angles
  36. local ud = UDim2.new
  37. local c3 = Color3.new
  38. local euler = CFrame.fromEulerAnglesXYZ
  39. local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  40.  
  41. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  42. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  43. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  44.  
  45. function clerp(a, b, t)
  46. return a:lerp(b, t)
  47. end
  48.  
  49.  
  50. ArtificialHB = Instance.new("BindableEvent", script)
  51. ArtificialHB.Name = "Heartbeat"
  52.  
  53. script:WaitForChild("Heartbeat")
  54.  
  55. frame = 1 / 30
  56. tf = 0
  57. allowframeloss = false
  58. tossremainder = false
  59. lastframe = tick()
  60. script.Heartbeat:Fire()
  61.  
  62. game:GetService("RunService").Heartbeat:connect(function(s, p)
  63. tf = tf + s
  64. if tf >= frame then
  65. if allowframeloss then
  66. script.Heartbeat:Fire()
  67. lastframe = tick()
  68. else
  69. for i = 1, math.floor(tf / frame) do
  70. script.Heartbeat:Fire()
  71. end
  72. lastframe = tick()
  73. end
  74. if tossremainder then
  75. tf = 0
  76. else
  77. tf = tf - frame * math.floor(tf / frame)
  78. end
  79. end
  80. end)
  81.  
  82. function swait(num)
  83. if num == 0 or num == nil then
  84. ArtificialHB.Event:wait()
  85. else
  86. for i = 0, num do
  87. ArtificialHB.Event:wait()
  88. end
  89. end
  90. end
  91.  
  92. local RbxUtility = LoadLibrary("RbxUtility")
  93. local Create = RbxUtility.Create
  94.  
  95. --[[ Credits to Fenrier for Outline-Remover, Part, Mesh, Weld, Raycase and Sound Creation functions ]]--
  96.  
  97. function RemoveOutlines(part)
  98. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  99. end
  100.  
  101. function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  102. local Part = Create("Part"){
  103. Parent = Parent,
  104. Reflectance = Reflectance,
  105. Transparency = Transparency,
  106. CanCollide = false,
  107. Locked = true,
  108. BrickColor = BrickColor.new(tostring(BColor)),
  109. Name = Name,
  110. Size = Size,
  111. Material = Material,
  112. }
  113. RemoveOutlines(Part)
  114. return Part
  115. end
  116.  
  117. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  118. local Msh = Create(Mesh){
  119. Parent = Part,
  120. Offset = OffSet,
  121. Scale = Scale,
  122. }
  123. if Mesh == "SpecialMesh" then
  124. Msh.MeshType = MeshType
  125. Msh.MeshId = MeshId
  126. end
  127. return Msh
  128. end
  129.  
  130. function CreateWeld(Parent, Part0, Part1, C0, C1)
  131. local Weld = Create("Weld"){
  132. Parent = Parent,
  133. Part0 = Part0,
  134. Part1 = Part1,
  135. C0 = C0,
  136. C1 = C1,
  137. }
  138. return Weld
  139. end
  140.  
  141. function CreateBillBoardGui(Img, Pos, Siz) --returns a basic billboard gui object for further manipulation
  142. local billpar = Create("Part"){
  143. Transparency = 1,
  144. Size = Vector3.new(1, 1, 1),
  145. Anchored = true,
  146. CanCollide = false,
  147. CFrame = CFrame.new(Pos),
  148. Name = "BillboardGuiPart",
  149. }
  150. local bill = Create("BillboardGui"){
  151. Parent = billpar,
  152. Adornee = billpar,
  153. Size = UDim2.new(1, 0, 1, 0),
  154. SizeOffset = Vector2.new(Siz, Siz),
  155. }
  156. local d = Create("ImageLabel"){
  157. Parent = bill,
  158. BackgroundTransparency = 1,
  159. Size = UDim2.new(1, 0, 1, 0),
  160. Image = Img,
  161. }
  162. return billpar
  163. end
  164.  
  165. function rayCast(Position, Direction, Range, Ignore)
  166. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  167. end
  168.  
  169. function CreateSound(id, par, vol, pit)
  170. coroutine.resume(coroutine.create(function()
  171. local S = Create("Sound"){
  172. Volume = vol or 3,
  173. Pitch = pit or 1,
  174. SoundId = id,
  175. Parent = par or workspace,
  176. }
  177. swait()
  178. S:play()
  179. game:GetService("Debris"):AddItem(S, 6)
  180. end))
  181. end
  182.  
  183. local function GetNearest(obj, distance)
  184. local last, lastx = distance + 1
  185. for i, v in pairs(workspace:GetChildren()) do
  186. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  187. local t = v.Torso
  188. local dist = (t.Position - obj.Position).magnitude
  189. if dist <= distance then
  190. if dist < last then
  191. last = dist
  192. lastx = v
  193. end
  194. end
  195. end
  196. end
  197. return lastx
  198. end
  199. -- do wat u want xd just dont delete any funcs ples <3 <3 well idk how to change the colours to math.random anyways so xD
  200. function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
  201. if hit and hit.Parent then
  202. for i, v in pairs(hit:GetChildren()) do
  203. if v and v.ClassName == "Humanoid" and hit and hit.Parent and hit.Name ~= Character.Name then
  204. local find = v:FindFirstChild("DebounceHit")
  205. if not find then
  206. if v.Parent:findFirstChild("Head") then
  207. local BillG = Create("BillboardGui"){
  208. Parent = v.Parent.Head,
  209. Size = UDim2.new(1, 0, 1, 0),
  210. Adornee = v.Parent.Head,
  211. StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
  212. }
  213. local TL = Create("TextLabel"){
  214. Parent = BillG,
  215. Size = UDim2.new(3, 3, 3, 3),
  216. BackgroundTransparency = 1,
  217. Text = tostring(damage).."-",
  218. TextColor3 = Color1.Color,
  219. TextStrokeColor3 = Color3.new(0, 0, 0),
  220. TextStrokeTransparency = 0,
  221. TextXAlignment = Enum.TextXAlignment.Center,
  222. TextYAlignment = Enum.TextYAlignment.Center,
  223. FontSize = Enum.FontSize.Size18,
  224. Font = "ArialBold",
  225. }
  226. coroutine.resume(coroutine.create(function()
  227. swait(1)
  228. for i = 0, 1, .1 do
  229. swait(.1)
  230. BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
  231. end
  232. BillG:Destroy()
  233. end))
  234. end
  235. v.Health = v.Health - damage
  236. local H = Humanoid.Health + damage
  237. Humanoid.MaxHealth = Humanoid.MaxHealth + 10
  238. wait()
  239. Humanoid.Health = H
  240. Humanoid.WalkSpeed = Humanoid.WalkSpeed + 1
  241. local bool = Create("BoolValue"){
  242. Parent = v,
  243. Name = "DebounceHit",
  244. }
  245. if HSound ~= nil and HPitch ~= nil then
  246. CreateSound(HSound, hit, 1, HPitch)
  247. end
  248. game:GetService("Debris"):AddItem(bool, cooldown)
  249. end
  250. end
  251. end
  252. end
  253. end
  254.  
  255. function MagnitudeDamage(Part, magni, mindam, maxdam, Color1, Color2, HSound, HPitch)
  256. for _, c in pairs(workspace:children()) do
  257. local hum = c:findFirstChild("Humanoid")
  258. if hum ~= nil then
  259. local head = c:findFirstChild("Torso")
  260. if head ~= nil then
  261. local targ = head.Position - Part.Position
  262. local mag = targ.magnitude
  263. if mag <= magni and c.Name ~= Player.Name then
  264. Damage(head.Parent, math.random(93717241, 93717241), 0.5, Color1, Color2, HSound, HPitch)
  265. end
  266. end
  267. end
  268. end
  269. end
  270.  
  271. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  272. local prt = CreatePart(Character, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  273. prt.Anchored = true
  274. prt.CFrame = cframe
  275. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  276. game:GetService("Debris"):AddItem(prt, 10)
  277. if Type == 1 or Type == nil then
  278. table.insert(Effects, {
  279. prt,
  280. "Block1",
  281. delay,
  282. x3,
  283. y3,
  284. z3,
  285. msh
  286. })
  287. elseif Type == 2 then
  288. table.insert(Effects, {
  289. prt,
  290. "Block2",
  291. delay,
  292. x3,
  293. y3,
  294. z3,
  295. msh
  296. })
  297. end
  298. end
  299.  
  300. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  301. local prt = CreatePart(Character, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  302. prt.Anchored = true
  303. prt.CFrame = cframe
  304. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  305. game:GetService("Debris"):AddItem(prt, 10)
  306. table.insert(Effects, {
  307. prt,
  308. "Cylinder",
  309. delay,
  310. x3,
  311. y3,
  312. z3,
  313. msh
  314. })
  315. end
  316.  
  317. function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  318. local prt = CreatePart(Character, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  319. prt.Anchored = true
  320. prt.CFrame = cframe * CFrame.new(x1, y1, z1)
  321. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  322. game:GetService("Debris"):AddItem(prt, 10)
  323. table.insert(Effects, {
  324. prt,
  325. "Cylinder",
  326. delay,
  327. x3,
  328. y3,
  329. z3,
  330. msh
  331. })
  332. end
  333.  
  334. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  335. local prt = CreatePart(Character, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  336. prt.Anchored = true
  337. prt.CFrame = cframe
  338. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  339. game:GetService("Debris"):AddItem(prt, 10)
  340. table.insert(Effects, {
  341. prt,
  342. "Cylinder",
  343. delay,
  344. x3,
  345. y3,
  346. z3,
  347. msh
  348. })
  349. end
  350.  
  351. function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  352. local prt = CreatePart(Character, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  353. prt.Anchored = true
  354. prt.CFrame = cframe
  355. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  356. game:GetService("Debris"):AddItem(prt, 10)
  357. table.insert(Effects, {
  358. prt,
  359. "Cylinder",
  360. delay,
  361. x3,
  362. y3,
  363. z3,
  364. msh
  365. })
  366. end
  367.  
  368. function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  369. local prt = CreatePart(Character, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  370. prt.Anchored = true
  371. prt.CFrame = cframe
  372. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  373. game:GetService("Debris"):AddItem(prt, 10)
  374. table.insert(Effects, {
  375. prt,
  376. "Cylinder",
  377. delay,
  378. x3,
  379. y3,
  380. z3,
  381. msh
  382. })
  383. end
  384.  
  385. function BreakEffect(brickcolor, cframe, x1, y1, z1)
  386. local prt = CreatePart(Character, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  387. prt.Anchored = true
  388. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  389. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  390. local num = math.random(10, 50) / 1000
  391. game:GetService("Debris"):AddItem(prt, 10)
  392. table.insert(Effects, {
  393. prt,
  394. "Shatter",
  395. num,
  396. prt.CFrame,
  397. math.random() - math.random(),
  398. 0,
  399. math.random(50, 100) / 100
  400. })
  401. end
  402.  
  403. local Sniper = Instance.new("Part", m)
  404. Sniper.Name = "Sniper"
  405. Sniper.CanCollide = false
  406. Sniper.Locked = true
  407. local M = Instance.new("SpecialMesh", Sniper)
  408. M.MeshId = "http://www.roblox.com/asset/?id=72012972"
  409. M.TextureId = "http://www.roblox.com/asset/?id=72012935"
  410. M.VertexColor = Vector3.new(2, 0, 2)
  411. M.Scale = Vector3.new(1.2, 1.2, 1.2)
  412. local WeaponWeld = Instance.new("Weld", Sniper)
  413. WeaponWeld.Part0 = Sniper
  414. WeaponWeld.Part1 = RightArm
  415. WeaponWeld.C0 = CFrame.new(0, -1.6, -0.6) * CFrame.Angles(math.rad(180), math.rad(0), math.rad(-360))
  416.  
  417. local EndOfGun = Instance.new("Part", m)
  418. EndOfGun.Name = "End Of Gun"
  419. EndOfGun.CanCollide = false
  420. EndOfGun.Locked = true
  421. EndOfGun.Transparency = 1
  422. EndOfGun.Size = Vector3.new(0.1, 0.1, 0.1)
  423.  
  424. local EOGW = Instance.new("Weld", EndOfGun)
  425. EOGW.Part0 = EndOfGun
  426. EOGW.Part1 = RightArm
  427. EOGW.C0 = CFrame.new(0, 3.5, 0.8)
  428.  
  429. local G = Instance.new("ScreenGui", PGui)
  430. G.Name = "PointCoded+dylanjenner13's sniper"
  431. local F = Instance.new("Frame", G)
  432. F.BackgroundColor3 = Color3.new(0, 0, 0)
  433. F.BackgroundTransparency = 0.3
  434. F.BorderSizePixel = 0
  435. F.Position = UDim2.new(0.5, -100, 0.2, 0)
  436. F.Size = UDim2.new(0, 200, 0, 28)
  437. local Fill = Instance.new("Frame", F)
  438. Fill.Name = "Fill"
  439. Fill.BackgroundColor3 = Color3.new(170, 0, 0)
  440. Fill.BackgroundTransparency = 0.3
  441. Fill.BorderSizePixel = 0
  442. Fill.Size = UDim2.new(0, 0, 0, 0)
  443. local HeatLabel = Instance.new("TextLabel", G)
  444. HeatLabel.BackgroundTransparency = 1
  445. HeatLabel.Position = UDim2.new(0.5, -75, 0.2, -22)
  446. HeatLabel.Size = UDim2.new(0, 150, 0, 20)
  447. HeatLabel.Font = Enum.Font.SourceSansBold
  448. HeatLabel.FontSize = Enum.FontSize.Size18
  449. HeatLabel.Text = "Heat: 0/100"
  450. HeatLabel.TextColor3 = Color3.new(0, 0, 0)
  451. HeatLabel.TextScaled = false
  452. HeatLabel.TextStrokeColor3 = Color3.new(255, 0, 0)
  453. HeatLabel.TextStrokeTransparency = 0.9
  454.  
  455. local CurrentHeat = 0
  456. local MaxHeat = 10000
  457. local CoolingDown = false
  458.  
  459. --[[ Attack Functions ]]--
  460.  
  461. local Mode = "Normal"
  462.  
  463. RSH = Torso["Right Shoulder"]
  464. LSH = Torso["Left Shoulder"]
  465. RH = Torso["Right Hip"]
  466. LH = Torso["Left Hip"]
  467. local RHCW0 = RH.C0
  468. local LHCW0 = LH.C0
  469. Animate = Character.Animate
  470. Animator = Humanoid.Animator
  471.  
  472. function Equip()
  473. attack = true
  474. equipped = true
  475. RSH.Parent = nil
  476. LSH.Parent = nil
  477. Animator.Parent = nil
  478. Animate.Disabled = true
  479. change = 3
  480. RW = Create("Weld"){
  481. Name = "Right Shoulder",
  482. Part0 = Torso ,
  483. C0 = CFrame.new(1.5, 0.5, 0),
  484. C1 = CFrame.new(0, 0.5, 0),
  485. Part1 = RightArm ,
  486. Parent = Torso ,
  487. }
  488. LW = Create("Weld"){
  489. Name = "Left Shoulder",
  490. Part0 = Torso ,
  491. C0 = CFrame.new(-1.5, 0.5, 0),
  492. C1 = CFrame.new(0, 0.5, 0) ,
  493. Part1 = LeftArm ,
  494. Parent = Torso ,
  495. }
  496. CreateSound("http://roblox.com/asset/?id=346134880", Torso, 1, 1)
  497. for i = 0, 1, 0.1 do
  498. swait()
  499. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), .2)
  500. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  501. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.3, -.5) * angles(math.rad(0), math.rad(170), math.rad(90)), .25)
  502. end
  503. CreateSound("http://roblox.com/asset/?id=346134880", Torso, 1, .9)
  504. attack = false
  505. end
  506.  
  507. Equip()
  508.  
  509. function Unequip()
  510. for i = 0, 1, 0.1 do
  511. swait()
  512. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  513. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  514. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  515. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  516. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  517. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
  518. end
  519. LH.C0 = LHCW0
  520. attack = true
  521. equipped = false
  522. RW.Parent = nil
  523. LW.Parent = nil
  524. RSH.Parent = Torso
  525. LSH.Parent = Torso
  526. Torso.Neck.C0 = NeckCF
  527. RootJoint.C0 = RootCF
  528. Animator.Parent = Humanoid
  529. Animate.Disabled = false
  530. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  531. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  532. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  533. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  534. attack = false
  535. end
  536.  
  537. function FindNearestTorso(Position,Distance)
  538. local List = {}
  539. for i,v in pairs(workspace:GetChildren())do
  540. if v:IsA("Model")then
  541. if v:findFirstChild("Torso")then
  542. if v ~= Character then
  543. if (v.Torso.Position -Position).magnitude <= Distance then
  544. table.insert(List,v)
  545. end
  546. end
  547. end
  548. end
  549. end
  550. if #List > 0 then
  551. return List[math.random(1, #List)]
  552. else
  553. return nil
  554. end
  555. end
  556.  
  557. --[[Attacks]]--
  558.  
  559. Grenade = function()
  560. if Anim ~= "Idle" then return nil end
  561. if not equipped then return nil end
  562. if attack then return nil end
  563. local HeatFromMove = 18
  564. if CurrentHeat + HeatFromMove > MaxHeat then CreateSound("rbxassetid://134969396") return nil end
  565. CurrentHeat = CurrentHeat + HeatFromMove
  566. attack = true
  567. local Grenade = Instance.new("Part", Character)
  568. Grenade.Size = Vector3.new(1, 1, 1)
  569. Grenade.CanCollide = false
  570. Grenade.CFrame = LeftArm.CFrame
  571. local M = Instance.new("SpecialMesh", Grenade)
  572. M.MeshId = "http://www.roblox.com/asset/?id=16975131"
  573. M.Scale = Vector3.new(0.9, 0.9, 0.9)
  574. M.TextureId = "http://www.roblox.com/asset/?id=16975111"
  575. local W = Instance.new("Weld", Grenade)
  576. W.Part0 = Grenade
  577. W.Part1 = LeftArm
  578. W.C0 = CFrame.new(0, 0.3, 1.2) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
  579. wait(0.5)
  580. for i=0,1,0.2 do
  581. swait()
  582. LW.C0=clerp(LW.C0,cn(-1.5,0.5,0)*angles(math.rad(150),math.rad(0),math.rad(0)),.3)
  583. end
  584. W:Destroy()
  585. Grenade.CanCollide = true
  586. Grenade.Velocity = Torso.CFrame.lookVector * 80 + Vector3.new(0,5,0)
  587. wait(3)
  588. if Grenade and Grenade ~= nil then
  589. local E = Instance.new("Explosion", workspace)
  590. E.Position = Grenade.Position
  591. E.BlastPressure = 0
  592. E.DestroyJointRadiusPercent = 0
  593. E.BlastRadius = 25
  594. Grenade.Anchored = true
  595. CreateSound("rbxassetid://259048528", nil, 2, 1.2)
  596. E.Hit:connect(function(hit)
  597. if hit and hit.Parent and hit.Parent.Parent then
  598. if hit.Parent ~= Character and hit.Parent.Parent ~= Character then
  599. if hit.Parent:findFirstChild("Humanoid") then
  600. Damage(hit.Parent, 5000, 20000, BrickColor.new("Institutional white"), BrickColor.new("Institutional white"), "rbxassetid://199149186" , 1)
  601. end
  602. end
  603. end
  604. end)
  605. Grenade:Destroy()
  606. end
  607.  
  608. attack = false
  609. end
  610.  
  611.  
  612. Cannon = function()
  613. if Anim ~= "Idle" then return nil end
  614. if not equipped then return nil end
  615. if attack then return nil end
  616. -- if CoolingDown then return nil end
  617. local HeatFromMove = 30
  618. if CurrentHeat + HeatFromMove > MaxHeat then CreateSound("rbxassetid://134969396") return nil end
  619. CurrentHeat = CurrentHeat + HeatFromMove
  620. attack = true
  621. local P = Instance.new("Part", Character)
  622. P.Shape = "Ball"
  623. P.Anchored = true
  624. P.CanCollide = false
  625. P.Locked = true
  626. P.BrickColor = BrickColor.new("Really black")
  627. P.Size = Vector3.new(1, 1, 1)
  628. P.CFrame = EndOfGun.CFrame
  629. P.Transparency = 0.9
  630. for i=0,8 do
  631. swait()
  632. P.Transparency = P.Transparency - 0.05
  633. P.Size = Vector3.new(P.Size.X + 0.15, P.Size.Y + 0.15, P.Size.Z + 0.15)
  634. P.CFrame = EndOfGun.CFrame
  635. BlockEffect(BrickColor.new("Institutional white"), P.CFrame, 1, 1, 1, 1.5, 1.5, 1.5, 0.1)
  636. end
  637. wait(0.5)
  638. for i=0,8 do
  639. swait()
  640. P.Transparency = P.Transparency + 0.05
  641. P.Size = Vector3.new(P.Size.X - 0.15, P.Size.Y - 0.15, P.Size.Z - 0.15)
  642. P.CFrame = EndOfGun.CFrame
  643. BlockEffect(BrickColor.new("Really black"), P.CFrame, 1, 1, 1, 1.5, 1.5, 1.5, 0.1)
  644. end
  645. wait(0.3)
  646. P:Destroy()
  647. CreateSound("rbxassetid://411274847", nil, 5, 0.8)
  648. local P1 = EndOfGun.Position
  649. local P2 = mouse.Hit.p
  650. local MouseLook = CFrame.new((P1 + P2) / 2, P2)
  651. local Continue = 100
  652. coroutine.resume(coroutine.create(function()
  653. repeat
  654. swait()
  655. local hit, pos = rayCast(P1, MouseLook.lookVector, 10, RootPart.Parent)
  656. local mag = (P1 - pos).magnitude
  657. local Colours = {"Really black", "Institutional white"}
  658. CylinderEffect(BrickColor.new(Colours[math.random(1, #Colours)]), CFrame.new((P1 + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0), math.random(3, 7), mag * math.random(5, 7), math.random(95, 100), .1, 0, 1.5, 0.1)
  659. P1 = P1 + (MouseLook.lookVector * 10)
  660. Continue = Continue - 1
  661. if hit ~= nil then
  662. Continue = 0
  663. CreateSound("rbxassetid://156444949", nil, 5, 0.5)
  664. local ref = CreatePart(Character, "SmoothPlastic", 0, 1, BrickColor.new(Colours[math.random(1, #Colours)]), "Reference", Vector3.new())
  665. ref.Anchored = true
  666. ref.CFrame = CFrame.new(pos)
  667. BlockEffect(BrickColor.new(Colours[math.random(1, #Colours)]), CFrame.new(pos), 20, 20, 20, 5, 5, 5, 0.1)
  668. SpecialEffect(BrickColor.new("Really black"), ref.CFrame, 4, 4, 4, 8, 8, 8, 2)
  669. MagnitudeDamage(ref, 50000, 900000, 500000, BrickColor.new("Institutional white"), BrickColor.new("Really black"), "rbxassetid://199149186" ,1)
  670. wait()
  671. for i = 1, 5 do
  672. local Color = hit.BrickColor
  673. local Materials = hit.Material
  674. local groundpart = CreatePart(Character, "SmoothPlastic", 0, 0, Color, "Ground", Vector3.new(math.random(50, 100) / 100, math.random(50, 100) / 100, math.random(50, 100) / 100))
  675. groundpart.Anchored = false
  676. groundpart.Material = Materials
  677. groundpart.CanCollide = true
  678. groundpart.Friction = 0.1
  679. groundpart.Velocity = Vector3.new(math.random(-50, 50), math.random(25, 50), math.random(-50, 50))
  680. groundpart.CFrame = CFrame.new(pos) * CFrame.new(math.random(-250, 250) / 100, 0.5, math.random(-250, 250) / 100) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  681. game:GetService("Debris"):AddItem(groundpart, 10)
  682. end
  683. for i = 1, 6 do
  684. local Color = hit.BrickColor
  685. local Materials = hit.Material
  686. local actualgroundpart = CreatePart(Character, "SmoothPlastic", 0, 0, Color, "Ground", Vector3.new(math.random(100, 200) / 100, math.random(100, 200) / 100, math.random(100, 200) / 100))
  687. actualgroundpart.Anchored = true
  688. actualgroundpart.Material = Materials
  689. actualgroundpart.CanCollide = true
  690. actualgroundpart.Friction = 1
  691. actualgroundpart.CFrame = CFrame.new(pos) * CFrame.new(math.random(-500, 500) / 100, 0, math.random(-500, 500) / 100) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  692. game:GetService("Debris"):AddItem(actualgroundpart, 10)
  693. end
  694. game:GetService("Debris"):AddItem(ref, 1)
  695. end
  696. until Continue <= 0
  697. end))
  698.  
  699. wait(1)
  700. attack = false
  701. end
  702. --So explain how this works? not yet not done xd k
  703. SpinShot = function()
  704. if Anim ~= "Idle" then return nil end
  705. if not equipped then return nil end
  706. if attack then return nil end
  707. -- if CoolingDown then return nil end
  708. local HeatFromMove = 50
  709. if CurrentHeat + HeatFromMove > MaxHeat then CreateSound("rbxassetid://134969396") return nil end
  710. CurrentHeat = CurrentHeat + HeatFromMove
  711. attack = true
  712. for i=0,1,0.2 do
  713. swait()
  714. RW.C0=clerp(RW.C0,cn(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.3)
  715. LW.C0=clerp(LW.C0,cn(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(-90)),.3)
  716. Torso.Neck.C0=clerp(Torso.Neck.C0,NeckCF*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  717. RootJoint.C0=clerp(RootJoint.C0,RootCF*cn(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  718. end
  719.  
  720. local LastTarget = nil
  721. for i=0,1,1 do
  722. swait()
  723. for i=0,1,0.1 do
  724. swait()
  725. RW.C0=clerp(RW.C0,cn(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.3)
  726. LW.C0=clerp(LW.C0,cn(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(-90)),.3)
  727. RootJoint.C0=clerp(RootJoint.C0,RootCF*cn(0,0,0)*euler(0, 0, 6*i),.3)
  728. spawn(function()
  729. local Target = nil
  730. repeat
  731. wait()
  732. Target = FindNearestTorso(Torso.CFrame.p, 200)
  733. until Target ~= LastTarget or attack == false
  734. if Target and Target ~= nil then
  735. if attack == false then return nil end
  736. LastTarget = Target
  737. if Target:findFirstChild("Torso") then
  738. Target = Target:findFirstChild("Torso")
  739.  
  740. CreateSound("rbxassetid://383602395", nil, 0.5)
  741. local Bullet = Instance.new("Part", Character)
  742. Bullet.Anchored = true
  743. Bullet.BrickColor = BrickColor.new("Really black")
  744. Bullet.Locked = true
  745. Bullet.Transparency = 1
  746. Bullet.CanCollide = false
  747. Bullet.Material = "Neon"
  748. Bullet.Name = "Bullet"
  749.  
  750. local P1 = EndOfGun.Position
  751. local P2 = Target.Position
  752. local Look = CFrame.new((P1 + P2) / 2, P2)
  753. local hit, pos = rayCast(P1, Look.lookVector, 1500, RootPart.Parent)
  754. local mag = (P1 - pos).magnitude
  755. mag = mag + 2
  756. Bullet.Transparency = 0.1
  757. Bullet.Size = Vector3.new(0.2, 0.2, mag)
  758. Bullet.CFrame = CFrame.new(P1, pos) * CFrame.new(0, 0, -mag / 2)
  759. if hit then
  760. local Dmg = 80
  761. if hit.Name == "Head" then CreateSound("rbxassetid://147936251") Dmg = 420 end
  762. if hit and hit.Parent and hit.Parent.ClassName == "Hat" or hit.ClassName == "Hat" then CreateSound("rbxassetid://147936251") Dmg = 420 end
  763. Damage(hit.Parent, Dmg, 2, BrickColor.new("Institutional white"), BrickColor.new("Institutional white"), "rbxassetid://199149186" , 1)
  764. end
  765. Bullet.Touched:connect(function(hit) local Dmg = 500 Damage(hit.Parent, Dmg, 300, BrickColor.new("Institutional white"), BrickColor.new("Institutional white"), "rbxassetid://199149186" , 1) end)
  766. for i = 0, 18 do
  767. wait()
  768. Bullet.Transparency = Bullet.Transparency + 0.05
  769. end
  770. swait()
  771. Bullet:Destroy()
  772. end
  773. end
  774. end)
  775. end
  776. end
  777. wait(1)
  778. attack = false
  779. end
  780.  
  781. AimbotBullet = function()
  782. if Anim ~= "Idle" then return nil end
  783. if not equipped then return nil end
  784. if attack then return nil end
  785. -- if CoolingDown then return nil end
  786. local HeatFromMove = 40
  787. if CurrentHeat + HeatFromMove > MaxHeat then CreateSound("rbxassetid://134969396") return nil end
  788. CurrentHeat = CurrentHeat + HeatFromMove
  789. attack = true
  790.  
  791. CreateSound("rbxassetid://153613030", nil, 5)
  792. local Target = FindNearestTorso(Torso.CFrame.p, 100)
  793. if Target and Target ~= nil then
  794. if Target:findFirstChild("Torso") then
  795. Target = Target:findFirstChild("Torso")
  796.  
  797. local B = Instance.new("Part", Character)
  798. B.Size = Vector3.new(2.5, 2.5, 2.5)
  799. B.BrickColor = BrickColor.new("Really black")
  800. B.Material = "SmoothPlastic"
  801. B.Locked = true
  802. B.CanCollide = false
  803. B.CFrame = EndOfGun.CFrame
  804. B.Anchored = true
  805.  
  806. spawn(function()
  807. wait(12)
  808. if B and B ~= nil then B:Destroy() end
  809. end)
  810.  
  811. for i = 0, 1, 0.1 do
  812. swait()
  813. BlockEffect(BrickColor.new("Really black"), B.CFrame, 0.2, 0.2, 0.2, 2, 2, 2, 0.1)
  814. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.6 + .07 * math.cos(sine / 23), -.2) * angles(math.rad(80 + 2 * math.cos(sine / 24)), math.rad(150 + 3 * math.cos(sine / 23)), math.rad(40)), .3)
  815. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.6 + .07 * math.cos(sine / 23), -.5) * angles(math.rad(-20 + 2 * math.cos(sine / 24)), math.rad(150 + 3 * math.cos(sine / 23)), math.rad(60)), .3)
  816. end
  817.  
  818. for i = 0, 1, 0.1 do
  819. swait()
  820. BlockEffect(BrickColor.new("Really black"), B.CFrame, 0.2, 0.2, 0.2, 1, 1, 1, 0.1)
  821. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.6 + .07 * math.cos(sine / 23), -.2) * angles(math.rad(80 + 2 * math.cos(sine / 24)), math.rad(20 + 3 * math.cos(sine / 23)), math.rad(30)), .3)
  822. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.6 + .07 * math.cos(sine / 23), -.5) * angles(math.rad(-20 + 2 * math.cos(sine / 24)), math.rad(150 + 3 * math.cos(sine / 23)), math.rad(60)), .3)
  823. end
  824.  
  825.  
  826. for i=0, 52 do
  827. swait()
  828. local P1 = EndOfGun.Position
  829. local P2 = Target.CFrame.p
  830. local Look = CFrame.new((P1 + P2) / 2, P2)
  831. local hit, pos = rayCast(P1, Look.lookVector, 1500, RootPart.Parent)
  832. local mag = (P1 - pos).magnitude
  833. BlockEffect(BrickColor.new("Really black"), B.CFrame, 2, 2, 2, 2.5, 2.5, 2.5, 0.1)
  834. BlockEffect(BrickColor.new("Institutional white"), B.CFrame, 1, 1, 1, 1.5, 1.5, 1.5, 0.1)
  835. B.CFrame = CFrame.new(P1, pos) * CFrame.new(0, 0, -mag / (52 - i))
  836. end
  837. B:Destroy()
  838. BlockEffect(BrickColor.new("Really red"), Target.CFrame, 1, 1, 1, 1.2, 1.2, 1.2, 0.1)
  839. Damage(Target.Parent, 85000, 20000, BrickColor.new("Royal purple"), BrickColor.new("Plum"), "rbxassetid://199149186" , 1)
  840. end
  841. end
  842. wait()
  843. attack = false
  844. end
  845.  
  846. local ShotColours = {"Carnation pink", "Toothpaste", "Really blue", "Really Red", "Eggplant", "Alder", "Persimmon", "Teal", "Royal purple", "Pastel blue-green", "Magenta", "Olive", "Lime green", "Dark blue", "Gold", "Bright yellow"}
  847. Shoot = function()
  848. if Anim ~= "Idle" then return nil end
  849. if not equipped then return nil end
  850. if attack then return nil end
  851. --if CoolingDown then return nil end
  852. local HeatFromMove = 20
  853. if CurrentHeat + HeatFromMove > MaxHeat then CreateSound("rbxassetid://134969396") return nil end
  854. CurrentHeat = CurrentHeat + HeatFromMove
  855. attack = true
  856.  
  857. local Bullet = Instance.new("Part", Character)
  858. Bullet.Anchored = true
  859. Bullet.BrickColor = BrickColor.new(ShotColours[math.random(1, #ShotColours)])
  860. Bullet.Locked = true
  861. Bullet.Transparency = 1
  862. Bullet.Material = "Neon"
  863. Bullet.Name = "Bullet"
  864. --hmmmmm Where is the damage? Also when we do moves? xD Soon y u always rush xd Cats rush :3 ofc they do xd
  865. --Ima make a dequip quickly okay <3 So what we doing now? :3 Movey move = Z So we do moves after?
  866. -- Why you leave bby? well private server code is 123 Pointcoded did you crash or something?
  867. Bullet.CanCollide = false
  868.  
  869. for i = 0, 1, 0.1 do
  870. swait()
  871. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.6 + .07 * math.cos(sine / 23), -.2) * angles(math.rad(80 + 2 * math.cos(sine / 24)), math.rad(40 + 3 * math.cos(sine / 23)), math.rad(40)), .3)
  872. end
  873.  
  874. CreateSound("rbxassetid://383602395")
  875.  
  876. local P1 = EndOfGun.Position
  877. local P2 = mouse.Hit.p
  878. local Look = CFrame.new((P1 + P2) / 2, P2)
  879. local hit, pos = rayCast(P1, Look.lookVector, 1500, RootPart.Parent)
  880. local mag = (P1 - pos).magnitude
  881. mag = mag + 2
  882. Bullet.Transparency = 0.1
  883. Bullet.Size = Vector3.new(0.2, 0.2, mag)
  884. Bullet.CFrame = CFrame.new(P1, pos) * CFrame.new(0, 0, -mag / 2)
  885. if hit then
  886. local Dmg = 800
  887. if hit.Name == "Head" then CreateSound("rbxassetid://147936251") Dmg = 420 end
  888. if hit and hit.Parent and hit.Parent.ClassName == "Hat" or hit.ClassName == "Hat" then CreateSound("rbxassetid://147936251") Dmg = 420 end
  889. Damage(hit.Parent, Dmg, 2, BrickColor.new(ShotColours[math.random(1, #ShotColours)]), BrickColor.new(ShotColours[math.random(1, #ShotColours)]), "rbxassetid://199149186" , 1)
  890. end
  891. Bullet.Touched:connect(function(hit) local Dmg = 600 Damage(hit.Parent, Dmg, 3, BrickColor.new(ShotColours[math.random(1, #ShotColours)]), BrickColor.new(ShotColours[math.random(1, #ShotColours)]), "rbxassetid://199149186" , 1) end)
  892. for i = 0, 18 do
  893. wait()
  894. Bullet.Transparency = Bullet.Transparency + 0.05
  895. end
  896. swait()
  897. Bullet:Destroy()
  898. attack = false
  899. end
  900.  
  901. local Guide = nil
  902. local Down = false
  903. mouse.Button1Down:connect(function()
  904. Down = true
  905. spawn(function()
  906. if Guide and Guide ~= nil then Guide:Destroy() end
  907. Guide = Instance.new("Part", Character)
  908. Guide.Shape = "Ball"
  909. Guide.Anchored = true
  910. Guide.Locked = true
  911. Guide.BrickColor = BrickColor.new("Really red")
  912. Guide.Transparency = 0.4
  913. Guide.CanCollide = false
  914. Guide.Material = "SmoothPlastic"
  915. Guide.Size = Vector3.new(0.3, 0.3, 0.3)
  916. repeat swait()
  917. Guide.CFrame = mouse.Hit
  918. until Down == false or attack == true
  919. if Guide and Guide ~= nil then Guide:Destroy() end
  920. end)
  921. end)
  922.  
  923. mouse.Button1Up:connect(function()
  924. Down = false
  925. Shoot()
  926. end)
  927.  
  928. mouse.KeyDown:connect(function(k)
  929. k = k:lower()
  930. if k == "f" and not attack then
  931. if equipped == true then
  932. Sniper.Transparency = 1
  933. Unequip()
  934. else
  935. Sniper.Transparency = 0
  936. Equip()
  937. end
  938. elseif k == "z" and not attack then
  939. AimbotBullet()
  940. elseif k == "e" and not attack then
  941. SpinShot()
  942. elseif k == "r" and not attack then
  943. Cannon()
  944. elseif k == "t" and not attack then
  945. Grenade()
  946. end
  947. end)
  948.  
  949. DoubleJump = function()
  950. if not equipped then return nil end
  951. if attack then return nil end
  952. attack = true
  953. Torso.Velocity = Vector3.new(0, 100, 0)
  954. Humanoid.Jump = true
  955. CreateSound("http://roblox.com/asset/?id=199145327", Torso, 1, .8)
  956. for i = 0, 1, 0.12 do
  957. swait()
  958. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(6 * i, math.rad(0), math.rad(0)), .3)
  959. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  960. RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -.5) * angles(math.rad(90), math.rad(0), math.rad(-40)), .3)
  961. LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5, -.5) * angles(math.rad(90), math.rad(0), math.rad(40)), .3)
  962. RH.C0 = clerp(RH.C0, cn(1, -.2, -.5) * RHCF * angles(math.rad(0), math.rad(0), math.rad(-20)), .3)
  963. LH.C0 = clerp(LH.C0, cn(-1, -.1, -.5) * LHCF * angles(math.rad(0), math.rad(0), math.rad(20)), .3)
  964. end
  965. for i = 0, 1, 0.12 do
  966. swait()
  967. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10 * i), math.rad(0), math.rad(0)), .5)
  968. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(20), math.rad(0), math.rad(0)), .5)
  969. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(60)), .5)
  970. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-60)), .5)
  971. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(40)), .5)
  972. LH.C0 = clerp(LH.C0, cn(-1, 0, -.5) * LHCF * angles(math.rad(0), math.rad(0), math.rad(20)), .5)
  973. end
  974. local hitfloor = nil
  975. while hitfloor == nil do
  976. swait()
  977. hitfloor, posfloor = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 3, Character)
  978. end
  979. MagnitudeDamage(RootPart, 30, 20, 35, BrickColor.new("Institutional white"), BrickColor.new("Really black"), "rbxassetid://199149186" ,1)
  980. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 6, Character)
  981. if hit ~= nil then
  982. local Color = hit.BrickColor
  983. local refpart = CreatePart(Character, "SmoothPlastic", 0, 1, "Institutional white", "Effect", Vector3.new())
  984. refpart.Anchored = true
  985. refpart.CFrame = CFrame.new(pos)
  986. game:GetService("Debris"):AddItem(refpart, 1)
  987. CreateSound("http://www.roblox.com/asset/?id=199145477", refpart, .8, 1)
  988. for i = 1, 5 do
  989. local Color = hit.BrickColor
  990. local Materials = hit.Material
  991. local groundpart = CreatePart(Character, "SmoothPlastic", 0, 0, Color, "Ground", Vector3.new(math.random(50, 100) / 100, math.random(50, 100) / 100, math.random(50, 100) / 100))
  992. groundpart.Anchored = false
  993. groundpart.Material = Materials
  994. groundpart.CanCollide = true
  995. groundpart.Friction = 0.1
  996. groundpart.Velocity = Vector3.new(math.random(-50, 50), math.random(25, 50), math.random(-50, 50))
  997. groundpart.CFrame = CFrame.new(pos) * CFrame.new(math.random(-250, 250) / 100, 0.5, math.random(-250, 250) / 100) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  998. game:GetService("Debris"):AddItem(groundpart, 10)
  999. end
  1000. for i = 1, 6 do
  1001. local Color = hit.BrickColor
  1002. local Materials = hit.Material
  1003. local actualgroundpart = CreatePart(Character, "SmoothPlastic", 0, 0, Color, "Ground", Vector3.new(math.random(100, 200) / 100, math.random(100, 200) / 100, math.random(100, 200) / 100))
  1004. actualgroundpart.Anchored = true
  1005. actualgroundpart.Material = Materials
  1006. actualgroundpart.CanCollide = true
  1007. actualgroundpart.Friction = 1
  1008. actualgroundpart.CFrame = CFrame.new(pos) * CFrame.new(math.random(-500, 500) / 100, 0, math.random(-500, 500) / 100) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1009. game:GetService("Debris"):AddItem(actualgroundpart, 10)
  1010. end
  1011. WaveEffect(hit.BrickColor, refpart.CFrame, 2, 2, 2, .5, .5, .5, 2)
  1012. SphereEffect(hit.BrickColor, refpart.CFrame, 3, 3, 3, 3, 3, 3, 2)
  1013. RingEffect(hit.BrickColor, refpart.CFrame * CFrame.Angles(math.random(5, 6), math.random(2, 7), math.random(3, 6)), 2, 2, .2, 1, 1, 1, 1)
  1014. end
  1015. attack = false
  1016. end
  1017.  
  1018. local canDoubleJump = true
  1019. game:GetService("UserInputService").InputBegan:connect(function(Input)
  1020. if Input.UserInputType == Enum.UserInputType.Keyboard then
  1021. Input = tostring(Input.KeyCode)
  1022. Input = string.sub(Input, 14)
  1023. if Input == "Space" then
  1024. if Humanoid.Jump == true and canDoubleJump then
  1025. canDoubleJump = false
  1026. DoubleJump()
  1027. end
  1028. end
  1029. end
  1030. end)
  1031.  
  1032. spawn(function()
  1033. while wait(5) do
  1034. canDoubleJump = true
  1035. if CurrentHeat > 0 then
  1036. CurrentHeat = CurrentHeat - 5
  1037. end
  1038. end
  1039. end)
  1040.  
  1041. --[[ Credits to Fenrier for the Movement Detection and Effects table. ]]-- so dud you add dmg
  1042.  
  1043. while true do
  1044. swait()
  1045. for i, v in pairs(Character:GetChildren()) do
  1046. if v:IsA("Part") then
  1047. v.Material = "SmoothPlastic"
  1048. elseif v:IsA("Hat") then
  1049. v:WaitForChild("Handle").Material = "SmoothPlastic"
  1050. end
  1051. end
  1052. local X = CurrentHeat / MaxHeat
  1053. Fill:TweenSize(UDim2.new(X, 0, 1, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, 0.2)
  1054. HeatLabel.Text = "Heat: "..CurrentHeat.."/"..MaxHeat
  1055. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1056. velocity = RootPart.Velocity.y
  1057. sine = sine + change
  1058. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  1059. if equipped == true then
  1060. if RootPart.Velocity.y > 1 and hit == nil then
  1061. Anim = "Jump"
  1062. if attack == false then
  1063. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1064. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-10), math.rad(0), math.rad(0)), .3)
  1065. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(30)), .3)
  1066. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), .3)
  1067. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(-20)), .3)
  1068. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(20)), .3)
  1069. end
  1070. elseif RootPart.Velocity.y < -1 and hit == nil then
  1071. Anim = "Fall"
  1072. if attack == false then
  1073. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  1074. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(30), math.rad(0), math.rad(0)), .3)
  1075. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(50)), .3)
  1076. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .3)
  1077. RH.C0 = clerp(RH.C0, cn(1, -.8, 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(20)), .3)
  1078. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(-20)), .3)
  1079. end
  1080. elseif Torsovelocity < 1 and hit ~= nil then
  1081. Anim = "Idle"
  1082. if attack == false then
  1083. change = 1
  1084. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -.1 + .1 * math.sin(sine / 27)) * angles(math.rad(0), math.rad(0), math.rad(30)), .3)
  1085. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 + 3 * math.cos(sine / 23)), math.rad(-2 - 3 * math.cos(sine / 23)), math.rad(-30)), .3)
  1086. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.6 + .07 * math.cos(sine / 23), -.2) * angles(math.rad(80 + 2 * math.cos(sine / 24)), math.rad(20 + 3 * math.cos(sine / 23)), math.rad(30)), .3)
  1087. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.6 + .07 * math.cos(sine / 23), -.5) * angles(math.rad(-20 + 2 * math.cos(sine / 24)), math.rad(-40 + 3 * math.cos(sine / 23)), math.rad(-40)), .3)
  1088. RH.C0 = clerp(RH.C0, cn(1, -.9 - .1 * math.sin(sine / 27), 0) * RHCF * angles(math.rad(-4 + 1 * math.cos(sine / 23)), math.rad(-30), math.rad(0)), .3)
  1089. LH.C0 = clerp(LH.C0, cn(-1, -.9 - .1 * math.sin(sine / 27), 0) * LHCF * angles(math.rad(-4 + 1 * math.cos(sine / 23)), math.rad(-30), math.rad(0)), .3)
  1090. end
  1091. elseif Torsovelocity > 2 and hit ~= nil then
  1092. Anim = "Walk"
  1093. if attack == false then
  1094. change = 3
  1095. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -.2) * angles(math.rad(20), math.rad(0), math.rad(1 * math.cos(sine / 10) / 2)), .3)
  1096. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-10), math.rad(0), math.rad(-5 * math.cos(sine / 10) / 2)), .3)
  1097. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.6 + .07 * math.cos(sine / 23), -.2) * angles(math.rad(5), math.rad(-30), math.rad(25)), .3)
  1098. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6 + .07 * math.cos(sine / 23), -.2) * angles(math.rad(5), math.rad(40), math.rad(-20)), .3)
  1099. RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 8) / 2, -.05 + math.sin(sine / 8) / 2) * RHCF * angles(math.rad(-4), math.rad(0), math.rad(10) - math.sin(sine / 8)), .3)
  1100. LH.C0 = clerp(LH.C0, cn(-1, -.9 + 0.3 * math.cos(sine / 8) / 2, -.05 - math.sin(sine / 8) / 2) * LHCF * angles(math.rad(-4), math.rad(0), math.rad(-10) - math.sin(sine / 8)), .3)
  1101. end
  1102. end
  1103. end
  1104. if #Effects > 0 then
  1105. for e = 1, #Effects do
  1106. if Effects[e] ~= nil then
  1107. local Thing = Effects[e]
  1108. if Thing ~= nil then
  1109. local Part = Thing[1]
  1110. local Mode = Thing[2]
  1111. local Delay = Thing[3]
  1112. local IncX = Thing[4]
  1113. local IncY = Thing[5]
  1114. local IncZ = Thing[6]
  1115. if Thing[1].Transparency <= 1 then
  1116. if Thing[2] == "Block1" then
  1117. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1118. Mesh = Thing[1].Mesh
  1119. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1120. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1121. elseif Thing[2] == "Block2" then
  1122. Thing[1].CFrame = Thing[1].CFrame
  1123. Mesh = Thing[7]
  1124. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1125. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1126. elseif Thing[2] == "Cylinder" then
  1127. Mesh = Thing[1].Mesh
  1128. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1129. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1130. elseif Thing[2] == "Blood" then
  1131. Mesh = Thing[7]
  1132. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
  1133. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1134. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1135. elseif Thing[2] == "Elec" then
  1136. Mesh = Thing[1].Mesh
  1137. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1138. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1139. elseif Thing[2] == "Disappear" then
  1140. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1141. elseif Thing[2] == "Shatter" then
  1142. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1143. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1144. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1145. Thing[6] = Thing[6] + Thing[5]
  1146. end
  1147. else
  1148. Part.Parent = nil
  1149. table.remove(Effects, e)
  1150. end
  1151. end
  1152. end
  1153. end
  1154. end
  1155. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement