Advertisement
uor

explosiOnIOn

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