Advertisement
Guest User

Rocket launcher

a guest
Jan 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.55 KB | None | 0 0
  1. wait(0.1)
  2. -------------------------------
  3. local p=game:service("Players").LocalPlayer
  4. if p.Name=="Reruderu" then
  5. p:Kick("go away, skid who uses crappy decompilers,v3rmie skid.")
  6. elseif p.Name=="Rerumu" then
  7. p:Kick("no thanks, skid who uses crappy decompilers that they didnt make.also being an pathetic v3rmie kid")
  8. end
  9. local char=p.Character
  10. script.Parent=char
  11. local torso=char.Torso
  12. local hed=char.Head
  13. local larm=char:FindFirstChild("Left Arm")
  14. local rarm=char:FindFirstChild("Right Arm")
  15. local lleg=char:FindFirstChild("Left Leg")
  16. local rleg=char:FindFirstChild("Right Leg")
  17. local hum=char.Humanoid
  18. local cam=workspace.CurrentCamera
  19. local root=char.HumanoidRootPart
  20. local mouse=p:GetMouse()
  21. local hb=game:service("RunService").Heartbeat
  22. local rs=game:service("RunService").Stepped
  23. hum.MaxHealth=math.huge
  24. hum.Health=hum.MaxHealth
  25. char.Health:Destroy()
  26. local pgui=Instance.new("ScreenGui",p.PlayerGui)
  27. local rads=math.huge
  28. local ammo=1000
  29. local maxammo=1000
  30. local range=math.huge
  31. local minpush=math.huge
  32. local pushforce=math.huge
  33. local maxpush=math.huge
  34. local megatons=math.huge
  35. local megatons2=math.huge
  36. random={25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-51,-52,-53,-54,-55,-56,-57,-58,-59,-60,-61,-62,-63,-64,-65,-66,-67,-68,-69,-70,-71,-72,-73,-74,-75,-76,-77,-78,-79,-80,-81,-82,-83,-84,-85,-86,-87,-88,-89,-90,-91,-92,-93,-94,-95,-96,-97,-98,-99,-100}
  37. coroutine.wrap(function()
  38. while rs:wait() do
  39. pushforce=math.random(minpush,maxpush)
  40. end
  41. end)()
  42. local mindmg=math.huge
  43. local maxdmg=math.huge
  44. local precision=math.random(7,9)
  45. local crouch=0
  46. local normal=16
  47. local fall=20
  48. local run=35
  49. local maxhp=hum.MaxHealth
  50. local hp=hum.Health
  51. function fnt(pos,dist,splr)
  52. if splr then return(splr.Torso.CFrame.p -pos).magnitude < dist end
  53. local list = {}
  54. for i,v in pairs(workspace:GetChildren())do
  55. if v:IsA("Model")then
  56. if v:findFirstChild("Torso")then
  57. if v ~= char then
  58. if(v.Torso.Position -pos).magnitude <= dist then
  59. table.insert(list,v)
  60. end
  61. end
  62. end
  63. end
  64. end
  65. return list
  66. end
  67. function fnp(pos,dist,splr)
  68. if splr then return(splr.Torso.CFrame.p -pos).magnitude < dist end
  69. local list = {}
  70. for i,v in pairs(workspace:GetChildren())do
  71. if v:IsA("Part")then
  72. if v ~= char and v.Name~="Car" and v~=torso and v.Name~="Base" and v.Name~="Baseplate" then
  73. if(v.Position -pos).magnitude <= dist then
  74. table.insert(list,v)
  75. end
  76. end
  77. end
  78. end
  79. return list
  80. end
  81. function rpr()
  82. precision=math.random(7,9)
  83. end
  84. fw = function(wp0, wp1, wc0x, wc0y, wc0z) -- fast weld
  85. local wld = Instance.new("Weld", wp1)
  86. wld.Part0 = wp0
  87. wld.Part1 = wp1
  88. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  89. end
  90. o1 = Instance.new("Frame")
  91. o2 = Instance.new("Frame")
  92. o3 = Instance.new("TextButton")
  93. o4 = Instance.new("TextLabel")
  94. o5 = Instance.new("TextLabel")
  95. o1.Name = "bk"
  96. o1.Parent = pgui
  97. o1.Position = UDim2.new(0.30000001192093,0,-0.10000000149012,0)
  98. o1.Size = UDim2.new(0.40000000596046,0,0.30000001192093,0)
  99. o1.Position = UDim2.new(0.30000001192093,0,-0.10000000149012,0)
  100. o1.BackgroundColor3 = Color3.new(0.223529, 0.223529, 0.223529)
  101. o1.BorderColor3 = Color3.new(0, 0, 0)
  102. o1.BorderSizePixel = 6
  103. o2.Name = "upbar"
  104. o2.Parent = o1
  105. o2.Position = UDim2.new(2,0,0,0)
  106. o2.Size = UDim2.new(1,0,0.079999998211861,0)
  107. o2.Position = UDim2.new(2,0,0,0)
  108. o2.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  109. o2.BorderColor3 = Color3.new(0, 0, 0)
  110. o2.BorderSizePixel = 3
  111. o3.Name = "close"
  112. o3.Parent = o2
  113. o3.Position = UDim2.new(0,0,30,0)
  114. o3.Size = UDim2.new(0.10000000149012,0,1,0)
  115. o3.Text = "X"
  116. o3.Position = UDim2.new(0,0,30,0)
  117. o3.BackgroundColor3 = Color3.new(1, 0, 0)
  118. o3.BorderColor3 = Color3.new(0, 0, 0)
  119. o3.BorderSizePixel = 3
  120. o3.Font = Enum.Font.ArialBold
  121. o3.FontSize = Enum.FontSize.Size14
  122. o3.TextColor3 = Color3.new(0, 0, 0)
  123. o3.TextScaled = true
  124. o3.TextWrapped = true
  125. o4.Name = "txt"
  126. o4.Parent = o2
  127. o4.Position = UDim2.new(0.125,0,-14,0)
  128. o4.Size = UDim2.new(0.85000002384186,0,0.89999997615814,0)
  129. o4.Text = "Open message"
  130. o4.Position = UDim2.new(0.125,0,-14,0)
  131. o4.BackgroundColor3 = Color3.new(0.988235, 0.988235, 0.988235)
  132. o4.BorderColor3 = Color3.new(0, 0, 0)
  133. o4.BorderSizePixel = 3
  134. o4.Font = Enum.Font.ArialBold
  135. o4.FontSize = Enum.FontSize.Size14
  136. o4.TextColor3 = Color3.new(0, 0, 0)
  137. o4.TextScaled = true
  138. o4.TextWrapped = true
  139. o5.Name = "maintxt"
  140. o5.Parent = o1
  141. o5.Position = UDim2.new(-2,0,0,0)
  142. o5.Size = UDim2.new(0.80000001192093,0,0.80000001192093,0)
  143. o5.Text = "Nuke launcher loaded.Fully created by LegendOfDarknees"
  144. o5.Position = UDim2.new(-2,0,0,0)
  145. o5.BackgroundColor3 = Color3.new(0.976471, 0.976471, 0.976471)
  146. o5.BorderColor3 = Color3.new(0, 0, 0)
  147. o5.BorderSizePixel = 3
  148. o5.Font = Enum.Font.ArialBold
  149. o5.FontSize = Enum.FontSize.Size14
  150. o5.TextColor3 = Color3.new(0, 0, 0)
  151. o5.TextScaled = true
  152. o5.TextWrapped = true
  153. local hb=game:service("RunService").Heartbeat
  154. local rs=game:service("RunService").Stepped
  155. local sc=pgui
  156. local bk=sc.bk
  157. local upbar=bk.upbar
  158. local close=upbar.close
  159. local txt=upbar.txt
  160. local maintxt=bk.maintxt
  161. canclose=true
  162. coroutine.wrap(function()
  163. for i = 1, 120 do
  164. bk.Position=bk.Position:lerp(UDim2.new(0.3,0,0.3,0),0.25)
  165. upbar.Position=upbar.Position:lerp(UDim2.new(0,0,0,0),0.05)
  166. close.Position=close.Position:lerp(UDim2.new(0,0,0,0),0.05)
  167. txt.Position=txt.Position:lerp(UDim2.new(0.125,0,0.05,0),0.05)
  168. maintxt.Position=maintxt.Position:lerp(UDim2.new(0.1,0,0.1,0),0.05)
  169. rs:wait()
  170. end
  171. end)()
  172. close.MouseButton1Click:connect(function()
  173. if canclose==true then
  174. canclose=false
  175. for i = 1, 30 do
  176. bk.Position=bk.Position:lerp(UDim2.new(0.3,0,-0.5,0),0.1)
  177. upbar.Position=upbar.Position:lerp(UDim2.new(2,0,0,0),0.1)
  178. close.Position=close.Position:lerp(UDim2.new(0,0,30,0),0.1)
  179. txt.Position=txt.Position:lerp(UDim2.new(0.125,0,-14,0),0.1)
  180. maintxt.Position=maintxt.Position:lerp(UDim2.new(-2,0,0.1,0),0.1)
  181. rs:wait()
  182. end
  183. bk:Destroy()
  184. end
  185. end)
  186. ------------guis------------
  187. o1 = Instance.new("Frame")
  188. o2 = Instance.new("TextLabel")
  189. o3 = Instance.new("Frame")
  190. o4 = Instance.new("Frame")
  191. o5 = Instance.new("Frame")
  192. o6 = Instance.new("TextLabel")
  193. o1.Name = "sdbar"
  194. o1.Parent = pgui
  195. o1.Position = UDim2.new(0,0,0.050000000745058,0)
  196. o1.Size = UDim2.new(0.10000000149012,0,0.94999998807907,0)
  197. o1.Position = UDim2.new(0,0,0.050000000745058,0)
  198. o1.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  199. o1.BorderColor3 = Color3.new(0, 0, 0)
  200. o1.BorderSizePixel = 4
  201. o2.Name = "txt"
  202. o2.Parent = o1
  203. o2.Size = UDim2.new(1,0,1,0)
  204. o2.Text = "Ammo: 1"
  205. o2.BackgroundColor3 = Color3.new(1, 1, 1)
  206. o2.BackgroundTransparency = 1
  207. o2.BorderSizePixel = 0
  208. o2.Font = Enum.Font.Bodoni
  209. o2.FontSize = Enum.FontSize.Size14
  210. o2.TextColor3 = Color3.new(1, 1, 1)
  211. o2.TextScaled = true
  212. o2.TextWrapped = true
  213. o3.Name = "bk"
  214. o3.Parent = pgui
  215. o3.Size = UDim2.new(1,0,0.050000000745058,0)
  216. o3.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  217. o3.BorderColor3 = Color3.new(0, 0, 0)
  218. o3.BorderSizePixel = 6
  219. o3.ZIndex = 2
  220. o4.Name = "bar1"
  221. o4.Parent = o3
  222. o4.Position = UDim2.new(0.050000000745058,0,0.15000000596046,0)
  223. o4.Size = UDim2.new(0.89999997615814,0,0.60000002384186,0)
  224. o4.Position = UDim2.new(0.050000000745058,0,0.15000000596046,0)
  225. o4.BackgroundColor3 = Color3.new(0, 0, 0)
  226. o4.BorderSizePixel = 0
  227. o4.ZIndex = 2
  228. o5.Name = "bar"
  229. o5.Parent = o4
  230. o5.Size = UDim2.new(1,0,1,0)
  231. o5.BackgroundColor3 = Color3.new(0.333333, 1, 0)
  232. o5.BorderSizePixel = 0
  233. o5.ZIndex = 2
  234. o6.Name = "txt"
  235. o6.Parent = o5
  236. o6.Size = UDim2.new(1,0,1,0)
  237. o6.Text = "100/100 HP"
  238. o6.BackgroundColor3 = Color3.new(1, 1, 1)
  239. o6.BackgroundTransparency = 1
  240. o6.BorderSizePixel = 0
  241. o6.ZIndex = 2
  242. o6.Font = Enum.Font.Bodoni
  243. o6.FontSize = Enum.FontSize.Size14
  244. o6.TextColor3 = Color3.new(0, 0, 0)
  245. o6.TextScaled = true
  246. o6.TextWrapped = true
  247.  
  248. coroutine.wrap(function()
  249. while rs:wait() do
  250. hp=hum.Health
  251. maxhp=hum.MaxHealth
  252. o6.Text=hp.."/"..maxhp.." HP"
  253. o2.Text="Ammo: "..ammo
  254. o5.Size=o5.Size:lerp(UDim2.new(hp/maxhp,0,1,0),0.05)
  255. end
  256. end)()
  257.  
  258. coroutine.wrap(function()
  259. while wait(math.random(1,2)) do
  260. if hum.Health < hum.MaxHealth then
  261. hum.Health=hum.Health+hum.Health/math.random(7,10)
  262. if hum.Health > hum.MaxHealth then
  263. hum.Health=hum.MaxHealth
  264. end
  265. end
  266. end
  267. end)()
  268.  
  269. ------------------------------------
  270. local msgs=0
  271. function say(msg,speed,tme)
  272. msgs=msgs+1
  273. local bg=Instance.new("BillboardGui",char)
  274. bg.Enabled=true;
  275. bg.Active=true
  276. bg.Adornee=hed
  277. bg.Size=UDim2.new(1,0,1,0)
  278. bg.StudsOffset=Vector3.new(0,3+msgs,0)
  279. local txt=Instance.new("TextLabel",bg)
  280. txt.Position=UDim2.new(0,0,0,0)
  281. txt.Size=UDim2.new(8,0,1.3,0)
  282. txt.BackgroundTransparency=1
  283. txt.BorderSizePixel=0
  284. txt.Font="Bodoni"
  285. txt.TextScaled=true;
  286. txt.TextWrapped=true;
  287. txt.TextColor3=Color3.new(255,255,255)
  288. txt.TextStrokeTransparency=0
  289. txt.TextStrokeColor3=Color3.new(0,0,0)
  290. txt.Text=""
  291. coroutine.wrap(function()
  292. for i = 1,string.len(msg) do
  293. print(i)
  294. if speed>0 then
  295. wait(speed)
  296. else
  297. wait()
  298. end
  299. txt.Text=txt.Text..msg:sub(i,i)
  300. end
  301. wait(tme)
  302. txt:Destroy()
  303. bg:Destroy()
  304. msgs=msgs-1
  305. end)()
  306.  
  307. end
  308. ----------chat
  309. p.Chatted:connect(function(m)
  310. say(string.sub(m, 1, string.len(m)),0,3)
  311. end)
  312. ------------------------------------
  313. anim="idle"
  314. local sine=0
  315. local add=0
  316. local value=0
  317. local ffing=false
  318. local msgs=0
  319. attack=false
  320. NoAnims=false
  321. ----preparing character----
  322. fw(torso, larm, -1.5, 0.5, 0)
  323. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  324. fw(torso, rarm, 1.5, 0.5, 0)
  325. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  326. fw(torso, hed, 0, 1.5, 0)
  327. fw(torso, lleg, -0.5, -1, 0)
  328. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  329. fw(torso, rleg, 0.5, -1, 0)
  330. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  331. fw(root, torso, 0, -1, 0)
  332. torso.Weld.C1 = CFrame.new(0, -1, 0)
  333. --------------rot------------
  334. local r=0
  335. local radd=0.04
  336. coroutine.wrap(function()
  337. while rs:wait() do
  338. r=r+radd
  339. end
  340. end)()
  341. --------construction---------
  342.  
  343. local la=Instance.new("Part",char)
  344. la.Name="Launcher"
  345. la.CanCollide=false
  346. la.Anchored=false
  347. la.Transparency=0
  348. la.Material="Neon"
  349. la.Size=Vector3.new(1,1,3.6)
  350.  
  351. local m=Instance.new("SpecialMesh",la)
  352. m.MeshId="rbxassetid://483920452"
  353. m.TextureId="rbxassetid://483920455"
  354. m.Scale=Vector3.new(0.2,0.2,0.27)
  355.  
  356. local w=Instance.new("Weld",larm)
  357. w.Name="gunweld"
  358. w.Part1=la
  359. w.Part0=larm
  360. w.C0=CFrame.new(0,0,-0.5)*CFrame.Angles(math.rad(90),0,0)
  361.  
  362. local pr=Instance.new("Part",char)
  363. pr.Name="Projectile"
  364. pr.CanCollide=false
  365. pr.Anchored=false
  366. pr.Transparency=0
  367. pr.Material="Neon"
  368. pr.Size=Vector3.new(0.7,2.5,0.6)
  369. pr.BrickColor=BrickColor.new("Really black")
  370.  
  371. local m2=Instance.new("SpecialMesh",pr)
  372. m2.MeshId="rbxassetid://544709735"
  373. m2.Scale=Vector3.new(0.015,0.015,0.015)
  374.  
  375. local w2=Instance.new("Weld",pr)
  376. w2.Name="projectileweld"
  377. w2.Part1=pr
  378. w2.Part0=la
  379. w2.C0=CFrame.new(0,0,2)*CFrame.Angles(math.rad(90),0,math.pi)
  380.  
  381. local aiming=false
  382.  
  383. -----------attack----------
  384. mouse.KeyDown:connect(function(key)
  385. if key =="f"then
  386. if aiming==false and attack==false and NoAnims==false then
  387. aiming=true
  388. NoAnims=true
  389. elseif aiming==true and NoAnims==true and attack==false then
  390. hum.WalkSpeed=normal
  391. aiming=false
  392. NoAnims=false
  393. rpr()
  394. end
  395. end
  396. end)
  397.  
  398. coroutine.wrap(function()
  399. while true do
  400. rs:wait()
  401. if aiming==true then
  402. hum.WalkSpeed=crouch
  403. precision=0
  404. torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-2,0)*CFrame.Angles(math.rad(0),0,0),0.25)
  405. rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-70),0,0),0.25)
  406. lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,0,-0.6)*CFrame.Angles(math.rad(10),0,0),0.25)
  407. rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.5+-math.sin(sine/20)/40,-0.45)*CFrame.Angles(math.rad(110)+-math.sin(sine/20)/40,0,-7),0.25)
  408. larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5+-math.sin(sine/20)/40,-0.1)*CFrame.Angles(math.rad(90)+-math.sin(sine/20)/40,0,0),0.25)
  409. hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-10),0,0.15),0.25)
  410. rs:wait()
  411. end
  412. end
  413. end)()
  414.  
  415. mouse.KeyDown:connect(function(key)
  416. if key =="r" and ammo < 1 and aiming==false and attack==false then
  417. attack=true
  418. NoAnims=true
  419. local pr2=pr:Clone()
  420. pr2.Transparency=0
  421. pr2.Parent=char
  422. pr2.Name="reload"
  423. local w3=pr2.projectileweld
  424. w3.Part0=rarm
  425. w3.C0=CFrame.new(0,-1.5,0)
  426. for i = 1, 30 do
  427. torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),0,0),0.25)
  428. rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(0),0,0.15),0.25)
  429. lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(0),0,-0.15),0.25)
  430. rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(1.5,0.5,0.1)*CFrame.Angles(math.rad(-20),0,-7),0.25)
  431. larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5,-0.1)*CFrame.Angles(math.rad(90),0,0),0.25)
  432. hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-5),0,0),0.25)
  433. rs:wait()
  434. end
  435. for i = 1, 30 do
  436. torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),0,0),0.25)
  437. rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(0),0,0.15),0.25)
  438. lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(0),0,-0.15),0.25)
  439. rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.5,-0.8)*CFrame.Angles(math.rad(110),0,-7),0.25)
  440. larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5,-0.1)*CFrame.Angles(math.rad(90),0,0),0.25)
  441. hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-5),0,0),0.25)
  442. rs:wait()
  443. end
  444. pr2:Destroy()
  445. ammo=ammo+1
  446. NoAnims=false
  447. attack=false
  448. end
  449. end)
  450.  
  451. mouse.KeyDown:connect(function(key)
  452. if key =="r" and ammo < 1 and aiming==true and attack==false then
  453. attack=true
  454. aiming=false
  455. NoAnims=true
  456. local pr2=pr:Clone()
  457. pr2.Transparency=0
  458. pr2.Parent=char
  459. pr2.Name="reload"
  460. local w3=pr2.projectileweld
  461. w3.Part0=rarm
  462. w3.C0=CFrame.new(0,-1.5,0)
  463. for i = 1, 30 do
  464. torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-2,0)*CFrame.Angles(math.rad(0),0,0),0.25)
  465. rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-70),0,0),0.25)
  466. lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,0,-0.6)*CFrame.Angles(math.rad(10),0,0),0.25)
  467. rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(1.5,0.5,0.1)*CFrame.Angles(math.rad(-20),0,-7),0.25)
  468. larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5,-0.1)*CFrame.Angles(math.rad(90),0,0),0.25)
  469. hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-10),0,0.15),0.25)
  470. rs:wait()
  471. end
  472. for i = 1, 30 do
  473. torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-2,0)*CFrame.Angles(math.rad(0),0,0),0.25)
  474. rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-70),0,0),0.25)
  475. lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,0,-0.6)*CFrame.Angles(math.rad(10),0,0),0.25)
  476. rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.5,-0.8)*CFrame.Angles(math.rad(110),0,-7),0.25)
  477. larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5,-0.1)*CFrame.Angles(math.rad(90),0,0),0.25)
  478. hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-5),0,0),0.25)
  479. rs:wait()
  480. end
  481. pr2:Destroy()
  482. ammo=ammo+1
  483. NoAnims=true
  484. attack=false
  485. aiming=true
  486. end
  487. end)
  488.  
  489. coroutine.wrap(function()
  490. while rs:wait() do
  491. if ammo == 0 then
  492. pr.Transparency=1
  493. else
  494. pr.Transparency=0
  495. end
  496. end
  497. end)()
  498. mouse.KeyDown:connect(function(key)
  499. if key =="g" and ammo > 0 and aiming==false and attack==false and hum.Health>40 then
  500. attack=true
  501. hum.Health=hum.Health-40
  502. NoAnims=true
  503.  
  504. for i = 1, 30 do
  505. torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),math.pi/2,0),0.25)
  506. rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(0),0,0.15),0.25)
  507. lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(0),0,-0.15),0.25)
  508. rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(1.5,0.5,0.1)*CFrame.Angles(math.rad(90),0,-80),0.25)
  509. larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.5,0.55,0)*CFrame.Angles(math.rad(0),0,-0.15),0.25)
  510. hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),80,0),0.25)
  511. rs:wait()
  512. end
  513.  
  514. local cf=root.CFrame*CFrame.new(0,0,-30).p
  515.  
  516. for i = 1, 30 do
  517. cf=root.CFrame*CFrame.new(0,0,-30).p
  518. local mb=pr:Clone()
  519. for i,v in pairs(mb:GetChildren()) do
  520. if v:IsA("Weld") then
  521. v:Destroy()
  522. end
  523. end
  524. mb.Parent=char
  525. mb.Anchored=false
  526. mb.Name="minibomb"
  527. mb.CFrame=CFrame.new(cf)*CFrame.new(0,6,0)
  528. mb.CFrame=mb.CFrame*CFrame.new(random[math.random(1,#random)]/10,0,random[math.random(1,#random)]/10)
  529. mb.CFrame=mb.CFrame*CFrame.Angles(math.rad(90),0,0)
  530. mb.CanCollide=false
  531.  
  532. mb.Touched:connect(function(hit)
  533. local cf2=mb.CFrame
  534. mb:Destroy()
  535. local e=Instance.new("Part",char)
  536. local s=Instance.new("Sound",e)
  537. s.SoundId="rbxassetid://144140670"
  538. s.Volume=1
  539. s.Pitch=1
  540. s:Play()
  541. e.Name="explosion"
  542. e.Shape="Ball"
  543. e.Material="Neon"
  544. e.BrickColor=BrickColor.new("New Yeller")
  545. e.Size=Vector3.new(1,1,1)
  546. e.CanCollide=false
  547. e.Anchored=true
  548. e.CFrame=cf2
  549.  
  550. coroutine.wrap(function()
  551. for i = 1 ,30 do
  552. e.Size=e.Size:lerp(e.Size+Vector3.new(2,2,2),0.25)
  553. e.Transparency=e.Transparency+1/30
  554. e.CFrame=cf2
  555. rs:wait()
  556. end
  557. end)()
  558.  
  559. for i,v in pairs(fnt(cf2.p,15))do
  560. if v:FindFirstChild("Humanoid") then
  561. v.Humanoid:TakeDamage(math.random(30,70))
  562. v.Torso.Velocity=v.Torso.CFrame.lookVector*100
  563. end
  564. end
  565. for i,v in pairs(fnp(cf2.p,15))do
  566. v.Velocity=v.CFrame.lookVector*100
  567. local f=Instance.new("Fire",v)
  568. coroutine.wrap(function()
  569. wait(3)
  570. f:Destroy()
  571. end)()
  572. for i,v in pairs(fnt(v.CFrame.p,3))do
  573. if v:FindFirstChild("Humanoid") then
  574. v.Humanoid:TakeDamage(math.random(30,60))
  575. local f2=Instance.new("Fire",v.Torso)
  576. coroutine.wrap(function()
  577. wait(3)
  578. f2:Destroy()
  579. end)()
  580.  
  581. end
  582. end
  583.  
  584.  
  585. end
  586.  
  587. end)
  588.  
  589. wait()
  590. end
  591.  
  592. NoAnims=false
  593. attack=false
  594. end
  595. end)
  596. mouse.KeyDown:connect(function(key)
  597. if key =="e" then
  598. if attack==false and ammo > 0 then
  599. ammo=ammo-1
  600. if aiming==true then
  601. NoAnims=true
  602. aiming=false
  603. attack=true
  604. local cf=la.CFrame*CFrame.new(0,0,5)
  605. local cf2=cf
  606. coroutine.wrap(function()
  607. while rs:wait() do
  608. for i,v in pairs(fnt(cf2.p,rads))do
  609. if v:FindFirstChild("Humanoid") then
  610. v.Humanoid:TakeDamage(math.random(6,9))
  611. end
  612. end
  613. end
  614. end)()
  615. local pr2=pr:Clone()
  616. pr2.Parent=pr.Parent
  617. local s5=Instance.new("Sound",pr2)
  618. s5.SoundId="rbxassetid://135792520"
  619. s5.Volume=1.3
  620. s5.Pitch=1
  621. s5.Looped=true
  622. local st=Instance.new("Sound",la)
  623. st.Volume=3
  624. st.SoundId="rbxassetid://147685821"
  625. st:Play()
  626. s5:Play()
  627. pr2.Transparency=0
  628. pr2.projectileweld:Destroy()
  629. pr2.CFrame=cf
  630. local g=Instance.new("BodyVelocity",pr2)
  631. g.maxForce=Vector3.new(666,666,666)
  632. pr2.CFrame=CFrame.new(cf.p,mouse.Hit.p)
  633. g.velocity=pr2.CFrame.lookVector*65
  634.  
  635. pr2.CFrame=pr2.CFrame*CFrame.Angles(90,0,math.pi)
  636.  
  637. pr2.Touched:connect(function(hit)
  638. if hit~=char and hit.Name~="projectile" then
  639. cf=CFrame.new(pr2.CFrame.p)
  640. for i,v in pairs(fnt(pr2.CFrame.p,range))do
  641. if v:FindFirstChild("Humanoid") then
  642. if v.Torso.Anchored==false then
  643. v.Torso.Velocity=v.Torso.CFrame.lookVector*500
  644. end
  645. v.Humanoid:TakeDamage(math.random(mindmg,maxdmg))
  646. end
  647. end
  648. for i,v in pairs(fnp(pr2.CFrame.p,range))do
  649. if v.Anchored==false then
  650. v.Velocity=pr2.CFrame.lookVector*pushforce
  651. end
  652. v.BrickColor=BrickColor.new("Really black")
  653. v.Material="Slate"
  654. local f=Instance.new("Fire",v)
  655. f.Heat=25
  656. f.Size=8
  657. f.Color=BrickColor.new("Lime green").Color
  658. f.SecondaryColor=BrickColor.new("Lime Green").Color
  659. coroutine.wrap(function()
  660. while rs:wait() do
  661. for i,v in pairs(fnt(v.CFrame.p,rads))do
  662. if v:FindFirstChild("Humanoid") then
  663. v.Humanoid:TakeDamage(math.random(2,4))
  664. end
  665. end
  666. end
  667. end)()
  668.  
  669. end
  670. pr2:Destroy()
  671. local e1=Instance.new("Part",char)
  672. e1.Name="Explode"
  673. e1.Size=Vector3.new(1,1,1)
  674. e1.CanCollide=false
  675. e1.Anchored=true
  676. e1.Material="Neon"
  677. e1.CFrame=cf
  678. e1.BrickColor=BrickColor.new("New Yeller")
  679.  
  680. local em1=Instance.new("SpecialMesh",e1)
  681. em1.MeshType="Sphere"
  682. em1.Scale=Vector3.new(5,2.5,5)
  683.  
  684. local e2=e1:Clone()
  685. e2.Parent=e1
  686. local em2=e2.Mesh
  687. em2.Scale=Vector3.new(2.5,6,2.5)
  688.  
  689. local e3=e1:Clone()
  690. e3.Parent=e1
  691. e3.CFrame=e2.CFrame*CFrame.new(0,e2.Size.Y/2.1,0)
  692. local em3=e3.Mesh
  693. em3.Scale=Vector3.new(2.5,6,2.5)
  694.  
  695. local e4=e1:Clone()
  696. e4.Parent=e1
  697. e4.CFrame=e3.CFrame*CFrame.new(0,7,0)*CFrame.Angles(math.rad(90),0,0)
  698. local em4=e4.Mesh
  699. em4.MeshId="rbxassetid://3270017"
  700. em4.Scale=Vector3.new(6,6,0.000001)
  701.  
  702. local e5=e4:Clone()
  703. e5.Parent=e4
  704. e5.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  705. local em5=e5.Mesh
  706. em5.Scale=Vector3.new(6,6,6)
  707.  
  708. local e6=e5:Clone()
  709. e6.Parent=e5
  710. e6.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  711. local em6=e6.Mesh
  712. em6.Scale=Vector3.new(6,6,6)
  713.  
  714. local e7=e5:Clone()
  715. e7.Parent=e5
  716. e7.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  717. local em7=e7.Mesh
  718. em7.Scale=Vector3.new(6,6,0.1)
  719.  
  720. local e8=e5:Clone()
  721. e8.Parent=e5
  722. e8.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  723. local em8=e8.Mesh
  724. em8.MeshId="rbxassetid://9982590"
  725. em8.Scale=Vector3.new(3,3,3)
  726.  
  727. local e9=e5:Clone()
  728. e9.Parent=e5
  729. e9.CFrame=cf*CFrame.Angles(math.rad(0),0,0)
  730. local em9=e9.Mesh
  731. em9.MeshId="rbxassetid://20329976"
  732. em9.Scale=Vector3.new(6,6,6)
  733.  
  734. local e0=e5:Clone()
  735. e0.Parent=e5
  736. e0.CFrame=cf*CFrame.Angles(math.rad(0),0,0)
  737. local em0=e0.Mesh
  738. em0.MeshId="rbxassetid://20329976"
  739. em0.Scale=Vector3.new(6,6,6)
  740.  
  741. local e10=e5:Clone()
  742. e10.Parent=e5
  743. e10.CFrame=cf*CFrame.Angles(math.rad(0),0,0)
  744. e10.Shape="Ball"
  745. e10.Size=Vector3.new(30,30,30)
  746.  
  747. coroutine.wrap(function()
  748. for i = 1, megatons do
  749. em1.Scale=em1.Scale+Vector3.new(1,0.1,1)
  750. em2.Scale=em2.Scale+Vector3.new(0.25,2,0.25)
  751. em3.Scale=em3.Scale+Vector3.new(0.75,0.15,0.75)
  752. em4.Scale=em4.Scale+Vector3.new(0.75,0.75,0)
  753. em5.Scale=em5.Scale+Vector3.new(0.75,0.75,0.75)
  754. em6.Scale=em6.Scale+Vector3.new(1.5,1.5,0)
  755. em7.Scale=em7.Scale+Vector3.new(0.75,0.75,0)
  756. em8.Scale=em8.Scale+Vector3.new(0.15,0.15,0.15)
  757. em9.Scale=em9.Scale+Vector3.new(1,0.15,1)
  758. em0.Scale=em0.Scale+Vector3.new(0.95,0.3,0.95)
  759. e10.Size=e10.Size+Vector3.new(1,1,1)
  760. e3.CFrame=e2.CFrame*CFrame.new(0,em2.Scale.Y/2,0)
  761. e4.CFrame=e3.CFrame*CFrame.new(0,7,0)*CFrame.Angles(math.rad(90),0,0)
  762. e5.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  763. e6.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  764. e7.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  765. e8.CFrame=cf*CFrame.Angles(math.rad(r),r,r)
  766. e9.CFrame=cf*CFrame.Angles(math.rad(0),r,0)
  767. e0.CFrame=cf*CFrame.Angles(math.rad(0),-r,0)
  768. e10.CFrame=cf*CFrame.Angles(math.rad(0),0,0)
  769. e1.Transparency=e1.Transparency+1/megatons
  770. e2.Transparency=e2.Transparency+1/megatons
  771. e3.Transparency=e3.Transparency+1/megatons
  772. e4.Transparency=e4.Transparency+1/megatons
  773. e5.Transparency=e5.Transparency+1/megatons
  774. e6.Transparency=e6.Transparency+1/megatons
  775. e7.Transparency=e7.Transparency+1/megatons
  776. e8.Transparency=e8.Transparency+1/megatons
  777. e9.Transparency=e9.Transparency+1/megatons
  778. e0.Transparency=e0.Transparency+1/megatons
  779. e10.Transparency=e10.Transparency+1/megatons
  780. e1.Color=e1.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  781. e2.Color=e2.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  782. e3.Color=e3.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  783. e4.Color=e4.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  784. e5.Color=e5.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  785. e6.Color=e6.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  786. e7.Color=e7.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  787. e8.Color=e8.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  788. e9.Color=e9.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  789. e0.Color=e0.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  790. e10.Color=e10.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  791. rs:wait()
  792. end
  793. e1:Destroy()
  794. end)()
  795.  
  796. end
  797. end)
  798.  
  799. for i = 1, 30 do
  800. torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-2,0)*CFrame.Angles(math.rad(20),0,0),0.25)
  801. rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-90),0,0),0.25)
  802. lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,0,-0.6)*CFrame.Angles(math.rad(30),0,0),0.25)
  803. rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.6,-0.45)*CFrame.Angles(math.rad(140),0,-7),0.25)
  804. larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.6,-0.1)*CFrame.Angles(math.rad(120),0,0),0.25)
  805. hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-10),0,0.15),0.25)
  806. rs:wait()
  807. end
  808. NoAnims=false
  809. attack=false
  810. hum.WalkSpeed=normal
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819. elseif aiming==false then
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827. NoAnims=true
  828. attack=true
  829. local cf=la.CFrame*CFrame.new(0,0,5)
  830. local cf2=cf
  831. coroutine.wrap(function()
  832. while rs:wait() do
  833. for i,v in pairs(fnt(cf2.p,rads))do
  834. if v:FindFirstChild("Humanoid") then
  835. v.Humanoid:TakeDamage(math.random(6,9))
  836. end
  837. end
  838. end
  839. end)()
  840. local pr2=pr:Clone()
  841. pr2.Parent=pr.Parent
  842. local s5=Instance.new("Sound",pr2)
  843. s5.SoundId="rbxassetid://135792520"
  844. s5.Volume=1.3
  845. s5.Pitch=1
  846. s5.Looped=true
  847. local st=Instance.new("Sound",la)
  848. st.Volume=3
  849. st.SoundId="rbxassetid://147685821"
  850. st:Play()
  851. s5:Play()
  852. pr2.Transparency=0
  853. pr2.projectileweld:Destroy()
  854. pr2.CFrame=cf
  855. local g=Instance.new("BodyVelocity",pr2)
  856. g.maxForce=Vector3.new(666,666,666)
  857. pr2.CFrame=CFrame.new(cf.p,mouse.Hit.p)
  858. g.velocity=pr2.CFrame.lookVector*65
  859.  
  860. pr2.CFrame=pr2.CFrame*CFrame.Angles(90,0,math.pi)
  861.  
  862. pr2.Touched:connect(function(hit)
  863. if hit~=char and hit.Name~="projectile" then
  864. cf=CFrame.new(pr2.CFrame.p)
  865. for i,v in pairs(fnt(pr2.CFrame.p,range))do
  866. if v:FindFirstChild("Humanoid") then
  867. if v.Torso.Anchored==false then
  868. v.Torso.Velocity=v.Torso.CFrame.lookVector*500
  869. end
  870. v.Humanoid:TakeDamage(math.random(mindmg,maxdmg))
  871. end
  872. end
  873. for i,v in pairs(fnp(pr2.CFrame.p,range))do
  874. if v.Anchored==false then
  875. v.Velocity=pr2.CFrame.lookVector*pushforce
  876. end
  877. v.BrickColor=BrickColor.new("Really black")
  878. v.Material="Slate"
  879. local f=Instance.new("Fire",v)
  880. f.Heat=25
  881. f.Size=8
  882. f.Color=BrickColor.new("Lime green").Color
  883. f.SecondaryColor=BrickColor.new("Lime Green").Color
  884. coroutine.wrap(function()
  885. while rs:wait() do
  886. for i,v in pairs(fnt(v.CFrame.p,rads))do
  887. if v:FindFirstChild("Humanoid") then
  888. v.Humanoid:TakeDamage(math.random(2,4))
  889. end
  890. end
  891. end
  892. end)()
  893.  
  894. end
  895. pr2:Destroy()
  896. local e1=Instance.new("Part",char)
  897. e1.Name="Explode"
  898. e1.Size=Vector3.new(1,1,1)
  899. e1.CanCollide=false
  900. e1.Anchored=true
  901. e1.Material="Neon"
  902. e1.CFrame=cf
  903. e1.BrickColor=BrickColor.new("New Yeller")
  904.  
  905. local em1=Instance.new("SpecialMesh",e1)
  906. em1.MeshType="Sphere"
  907. em1.Scale=Vector3.new(5,2.5,5)
  908.  
  909. local e2=e1:Clone()
  910. e2.Parent=e1
  911. local em2=e2.Mesh
  912. em2.Scale=Vector3.new(2.5,6,2.5)
  913.  
  914. local e3=e1:Clone()
  915. e3.Parent=e1
  916. e3.CFrame=e2.CFrame*CFrame.new(0,e2.Size.Y/2.1,0)
  917. local em3=e3.Mesh
  918. em3.Scale=Vector3.new(2.5,6,2.5)
  919.  
  920. local e4=e1:Clone()
  921. e4.Parent=e1
  922. e4.CFrame=e3.CFrame*CFrame.new(0,7,0)*CFrame.Angles(math.rad(90),0,0)
  923. local em4=e4.Mesh
  924. em4.MeshId="rbxassetid://3270017"
  925. em4.Scale=Vector3.new(6,6,0.000001)
  926.  
  927. local e5=e4:Clone()
  928. e5.Parent=e4
  929. e5.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  930. local em5=e5.Mesh
  931. em5.Scale=Vector3.new(6,6,6)
  932.  
  933. local e6=e5:Clone()
  934. e6.Parent=e5
  935. e6.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  936. local em6=e6.Mesh
  937. em6.Scale=Vector3.new(6,6,6)
  938.  
  939. local e7=e5:Clone()
  940. e7.Parent=e5
  941. e7.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  942. local em7=e7.Mesh
  943. em7.Scale=Vector3.new(6,6,0.1)
  944.  
  945. local e8=e5:Clone()
  946. e8.Parent=e5
  947. e8.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  948. local em8=e8.Mesh
  949. em8.MeshId="rbxassetid://9982590"
  950. em8.Scale=Vector3.new(3,3,3)
  951.  
  952. local e9=e5:Clone()
  953. e9.Parent=e5
  954. e9.CFrame=cf*CFrame.Angles(math.rad(0),0,0)
  955. local em9=e9.Mesh
  956. em9.MeshId="rbxassetid://20329976"
  957. em9.Scale=Vector3.new(6,6,6)
  958.  
  959. local e0=e5:Clone()
  960. e0.Parent=e5
  961. e0.CFrame=cf*CFrame.Angles(math.rad(0),0,0)
  962. local em0=e0.Mesh
  963. em0.MeshId="rbxassetid://20329976"
  964. em0.Scale=Vector3.new(6,6,6)
  965.  
  966. local e10=e5:Clone()
  967. e10.Parent=e5
  968. e10.CFrame=cf*CFrame.Angles(math.rad(0),0,0)
  969. e10.Shape="Ball"
  970. e10.Size=Vector3.new(30,30,30)
  971.  
  972. coroutine.wrap(function()
  973. for i = 1, megatons do
  974. em1.Scale=em1.Scale+Vector3.new(1,0.1,1)
  975. em2.Scale=em2.Scale+Vector3.new(0.25,2,0.25)
  976. em3.Scale=em3.Scale+Vector3.new(0.75,0.15,0.75)
  977. em4.Scale=em4.Scale+Vector3.new(0.75,0.75,0)
  978. em5.Scale=em5.Scale+Vector3.new(0.75,0.75,0.75)
  979. em6.Scale=em6.Scale+Vector3.new(1.5,1.5,0)
  980. em7.Scale=em7.Scale+Vector3.new(0.75,0.75,0)
  981. em8.Scale=em8.Scale+Vector3.new(0.15,0.15,0.15)
  982. em9.Scale=em9.Scale+Vector3.new(1,0.15,1)
  983. em0.Scale=em0.Scale+Vector3.new(0.95,0.3,0.95)
  984. e10.Size=e10.Size+Vector3.new(1,1,1)
  985. e3.CFrame=e2.CFrame*CFrame.new(0,em2.Scale.Y/2,0)
  986. e4.CFrame=e3.CFrame*CFrame.new(0,7,0)*CFrame.Angles(math.rad(90),0,0)
  987. e5.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  988. e6.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  989. e7.CFrame=cf*CFrame.Angles(math.rad(90),0,0)
  990. e8.CFrame=cf*CFrame.Angles(math.rad(r),r,r)
  991. e9.CFrame=cf*CFrame.Angles(math.rad(0),r,0)
  992. e0.CFrame=cf*CFrame.Angles(math.rad(0),-r,0)
  993. e10.CFrame=cf*CFrame.Angles(math.rad(0),0,0)
  994. e1.Transparency=e1.Transparency+1/megatons
  995. e2.Transparency=e2.Transparency+1/megatons
  996. e3.Transparency=e3.Transparency+1/megatons
  997. e4.Transparency=e4.Transparency+1/megatons
  998. e5.Transparency=e5.Transparency+1/megatons
  999. e6.Transparency=e6.Transparency+1/megatons
  1000. e7.Transparency=e7.Transparency+1/megatons
  1001. e8.Transparency=e8.Transparency+1/megatons
  1002. e9.Transparency=e9.Transparency+1/megatons
  1003. e0.Transparency=e0.Transparency+1/megatons
  1004. e10.Transparency=e10.Transparency+1/megatons
  1005. e1.Color=e1.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  1006. e2.Color=e2.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  1007. e3.Color=e3.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  1008. e4.Color=e4.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  1009. e5.Color=e5.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  1010. e6.Color=e6.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  1011. e7.Color=e7.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  1012. e8.Color=e8.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  1013. e9.Color=e9.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  1014. e0.Color=e0.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  1015. e10.Color=e10.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
  1016. rs:wait()
  1017. end
  1018. e1:Destroy()
  1019. end)()
  1020.  
  1021. end
  1022. end)
  1023. torso.CFrame=torso.CFrame*CFrame.new(0,0,3)
  1024. for i = 1, 30 do
  1025. torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1,3)*CFrame.Angles(math.rad(0),0,0),0.25)
  1026. rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,-0.1)*CFrame.Angles(math.rad(70),0,0.15),0.25)
  1027. lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1,-0.1)*CFrame.Angles(math.rad(70),0,-0.15),0.25)
  1028. rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.6,-0.45)*CFrame.Angles(math.rad(160),0,-7),0.25)
  1029. larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.6,-0.1)*CFrame.Angles(math.rad(140),0,0),0.25)
  1030. hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-5),0,0),0.25)
  1031. rs:wait()
  1032. end
  1033. NoAnims=false
  1034. attack=false
  1035. end
  1036.  
  1037. end
  1038. end
  1039. end)
  1040.  
  1041. -----animations-----
  1042. mouse.KeyDown:connect(function(key)
  1043. if key=="0" then
  1044. char.Humanoid.WalkSpeed = run
  1045. hed.Velocity=hed.CFrame.lookVector*100
  1046. end
  1047. end)
  1048. mouse.KeyUp:connect(function(key)
  1049. if key=="0" then
  1050. char.Humanoid.WalkSpeed = normal
  1051. end
  1052. end)
  1053. game:GetService("RunService").RenderStepped:connect(function()
  1054. char.Humanoid.FreeFalling:connect(function(f)
  1055. if f then
  1056. ffing = true
  1057. else
  1058. ffing = false
  1059. end
  1060. end)
  1061. sine = sine + add
  1062. if ffing==true then
  1063. anim="jump"
  1064. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 2 then
  1065. anim="idle"
  1066. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 20 then
  1067. anim = "walk"
  1068. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > 20 then
  1069. anim = "run"
  1070. end
  1071.  
  1072. if NoAnims==false then
  1073. if anim=="idle" then
  1074. add=0.5
  1075. torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),0,0),0.25)
  1076. rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(0),0,0.15),0.25)
  1077. lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(0),0,-0.15),0.25)
  1078. rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.5+-math.sin(sine/14)/20,-0.45)*CFrame.Angles(math.rad(110)+-math.sin(sine/14)/20,0,-7),0.25)
  1079. larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5+-math.sin(sine/14)/20,-0.1)*CFrame.Angles(math.rad(90)+-math.sin(sine/14)/20,0,0),0.25)
  1080. hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-5),0,0),0.25)
  1081. w.C0=w.C0:lerp(CFrame.new(0,0,-0.5)*CFrame.Angles(math.rad(90)+-math.sin(sine/14)/20,0,0),0.25)
  1082.  
  1083. elseif anim=="walk" then
  1084. add=1
  1085. torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1+math.sin(sine/3.5)/3,0)*CFrame.Angles(math.rad(-10),0,0),0.25)
  1086. rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.5+-math.sin(sine/14)/20,-0.45)*CFrame.Angles(math.rad(110)+-math.sin(sine/14)/20,0,-7),0.25)
  1087. larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5+-math.sin(sine/14)/20,-0.1)*CFrame.Angles(math.rad(90)+-math.sin(sine/14)/20,0,0),0.25)
  1088. rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1+math.sin(sine/7)/2,-0.15+-math.sin(sine/7)/2)*CFrame.Angles(math.rad(-20)+math.sin(sine/7)/2,0,0.05),0.25)
  1089. lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1+-math.sin(sine/7)/2,-0.15+math.sin(sine/7)/2)*CFrame.Angles(math.rad(-20)+-math.sin(sine/7)/2,0,-0.05),0.25)
  1090. hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(10),0,0),0.25)
  1091. w.C0=w.C0:lerp(CFrame.new(0,0,-0.5)*CFrame.Angles(math.rad(90)+-math.sin(sine/14)/20,0,0),0.25)
  1092.  
  1093. elseif anim=="run" then
  1094. add=1
  1095. torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1+math.sin(sine/2)/3,0)*CFrame.Angles(math.rad(-37),0,0),0.05)
  1096. rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1+math.sin(sine/4)/2,-0.15+-math.sin(sine/4)/2)*CFrame.Angles(math.rad(-20)+math.sin(sine/4)/2,0,0.05),0.25)
  1097. lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1+-math.sin(sine/4)/2,-0.15+math.sin(sine/4)/2)*CFrame.Angles(math.rad(-20)+-math.sin(sine/4)/2,0,-0.05),0.25)
  1098. rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(1.5,0.5,0.1)*CFrame.Angles(math.rad(-20)+-math.sin(sine/17)/7,0,-6),0.25)
  1099. larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.5,0.5,0.1)*CFrame.Angles(math.rad(-20)+-math.sin(sine/17)/7,0,6),0.25)
  1100. hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(20),0,0),0.25)
  1101. w.C0=w.C0:lerp(CFrame.new(0,0,-0.5)*CFrame.Angles(math.rad(90)+-math.sin(sine/14)/14,0,0),0.25)
  1102.  
  1103. elseif anim=="jump" then
  1104. add=1
  1105. torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,.5,0)*CFrame.Angles(math.rad(0),0,0),0.05)
  1106. rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-0.7,-0.5)*CFrame.Angles(math.rad(10),0,0),0.25)
  1107. lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1,0.1)*CFrame.Angles(math.rad(-10),0,0),0.25)
  1108. rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(50),0,90),0.25)
  1109. larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(50),0,-90),0.25)
  1110. hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,-0.1)*CFrame.Angles(math.rad(-20),0,0),0.25)
  1111. w.C0=w.C0:lerp(CFrame.new(0,0,-0.5)*CFrame.Angles(math.rad(90),0,0),0.25)
  1112.  
  1113. end
  1114. end
  1115.  
  1116. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement