Advertisement
EdgyHedgehog

Insane Nuke Launcher

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