Advertisement
DarkScriptZEditors

Untitled

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