Advertisement
firebudgy

Untitled

May 19th, 2018
420
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.49 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. LocalScript1 = Instance.new("LocalScript")
  21. LocalScript2 = Instance.new("LocalScript")
  22. ScreenGui3 = Instance.new("ScreenGui")
  23. ImageLabel4 = Instance.new("ImageLabel")
  24. ImageLabel5 = Instance.new("ImageLabel")
  25. ImageLabel6 = Instance.new("ImageLabel")
  26. Script7 = Instance.new("Script")
  27. Part8 = Instance.new("Part")
  28. SpecialMesh9 = Instance.new("SpecialMesh")
  29. Sound10 = Instance.new("Sound")
  30. Part11 = Instance.new("Part")
  31. SpecialMesh12 = Instance.new("SpecialMesh")
  32. Part13 = Instance.new("Part")
  33. SpecialMesh14 = Instance.new("SpecialMesh")
  34. Script15 = Instance.new("Script")
  35. Script16 = Instance.new("Script")
  36. LocalScript17 = Instance.new("LocalScript")
  37. LocalScript18 = Instance.new("LocalScript")
  38. Tool0.Name = "Jarate"
  39. Tool0.Parent = mas
  40. Tool0.TextureId = "http://www.roblox.com/asset/?id=130784959"
  41. Tool0.ToolTip = "What is this? I THROW IT"
  42. Tool0.CanBeDropped = false
  43. LocalScript1.Name = "TurnHandler"
  44. LocalScript1.Parent = Tool0
  45. table.insert(cors,sandbox(LocalScript1,function()
  46. wait()
  47. Tool=script.Parent
  48. CP,Torso,g=nil,nil,nil
  49. necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  50. getPos=function(Pos,TorsoPos)
  51. return Vector3.new(Pos.x,TorsoPos.y,Pos.z)
  52. end
  53. Turn=function(mouse,Torso,Gyro)
  54. g.cframe=CFrame.new(Torso.Position,getPos(mouse.Hit.p,Torso.Position))
  55. offset=(Torso.Position.y-mouse.Hit.p.y)/100
  56. mag=(Torso.Position-mouse.Hit.p).magnitude/80
  57. offset=offset/mag
  58. neck=Torso.Neck
  59. neck.C0=necko*CFrame.fromEulerAnglesXYZ(offset,0,0)
  60. arm=Torso:FindFirstChild("Right Shoulder")
  61. if arm~=nil then
  62. --a=workspace.Player1.Torso["Right Shoulder"] a.C0=CFrame.new(1, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)*CFrame.Angles(math.rad(40),0,math.rad(140))
  63. arm.C0=CFrame.new(1, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)*CFrame.Angles(math.rad(40),0,math.rad(50)-offset)
  64. end
  65. end
  66. Equi=function(mouse)
  67. wait(.2)
  68. CP=Tool.Parent
  69. Torso=CP.Torso
  70. g=Instance.new("BodyGyro")
  71. g.P=18000
  72. g.D=600
  73. g.maxTorque=Vector3.new(80000,80000000,80000)*math.huge
  74. g.cframe=Torso.CFrame
  75. g.Parent=Torso
  76. while true do
  77. if Tool.Parent.className~="Model" then
  78. break
  79. end
  80. Turn(mouse,Torso,g)
  81. wait()
  82. end
  83. Torso.Neck.C0=necko
  84. g:Remove()
  85. end
  86. Tool.Equipped:connect(Equi)
  87. Tool.Unequipped:connect(function()
  88. neck.C0=necko
  89. arm.C0=CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  90. end)
  91. end))
  92. LocalScript2.Name = "JarateHandler"
  93. LocalScript2.Parent = Tool0
  94. table.insert(cors,sandbox(LocalScript2,function()
  95. --Jarate, by Dakota99!
  96. --[[
  97. Instructions
  98. 1. Equip jarate
  99. 2. Throw jarate at enemies
  100. 3. Get 1.5x damage (configurable) on enemies
  101. ]]--
  102. Player=game:GetService("Players").LocalPlayer
  103. HitOwner=false --will jarate hit the owner?
  104. MaxWait=30 --reload time
  105. ThrowVel=200 --throw force
  106. MaxRange=50 --studs that jarate affects
  107. _G.Jarate={}
  108. _G.Jarate["Ready"]=true
  109. --Sounds! This was made on the day of the sound update, 9/25/13.
  110. do
  111. SoundPrefix="http://www.roblox.com/asset/?id="
  112. Sounds={}
  113. Sounds.Throw1=130778773
  114. Sounds.Throw2=130778782
  115. Sounds.Throw3=130778789
  116. Sounds.Break =130779009
  117. function soundPlay(ent,id)
  118. local Sound=Instance.new("Sound",ent)
  119. Sound.SoundId=SoundPrefix..id
  120. Sound.PlayOnRemove=true
  121. Sound.Volume=0.3
  122. Sound:remove()
  123. end
  124. for _,v in pairs(Sounds) do
  125. game:GetService("ContentProvider"):Preload(SoundPrefix..v)
  126. end
  127. end
  128.  
  129. --Core Variables
  130. do
  131. Tool=script.Parent
  132. Handle=Tool.Handle
  133. Welds={
  134. ["Lid"]={
  135. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  136. CFrame.new(0, -0.4, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  137. },
  138. ["Urine"]={
  139. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  140. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  141. }
  142. }
  143. end
  144.  
  145.  
  146. function setAlpha(n)
  147. for _,v in pairs(Tool:GetChildren()) do
  148. if v:IsA("BasePart") then
  149. v.Transparency=n
  150. if v.Name=="Handle" then
  151. if n~=0 then v.Transparency=n else v.Transparency=0.5 end
  152. end
  153. end
  154. end
  155. end
  156. --Jarate Core
  157. function markTargets(pos,range)
  158. local Humanoids={}
  159. function scan(a)
  160. if (not a:IsDescendantOf(Player.Character) or HitOwner) and a:IsA("Humanoid") and a.Torso and a.Torso:IsA("Part") then
  161. local Targ=a.Torso
  162. if (Targ.Position-pos).magnitude<range then
  163. if a:FindFirstChild("Jarate") then a.Jarate.Parent=nil end
  164. table.insert(Humanoids,a)
  165. end
  166. end
  167. for _,v in pairs(a:GetChildren()) do
  168. scan(v)
  169. end
  170. end
  171. scan(workspace)
  172.  
  173. for _,v in pairs(Humanoids) do
  174. local New=script.Jarate:clone()
  175. New.Parent=v
  176. New.Disabled=false
  177. end
  178.  
  179. end
  180.  
  181. function ThrowJarate()
  182. local Mouse=Player:GetMouse()
  183. local AimDir=(Mouse.hit.p-Player.Character.Head.Position).unit
  184. local Projectile=Instance.new("Model")
  185. for _,v in pairs(Tool:GetChildren()) do
  186. if v:IsA("BasePart") then
  187. v:clone().Parent=Projectile
  188. end
  189. end
  190. for _,v in pairs(Projectile:GetChildren()) do
  191. for index,data in pairs(Welds) do
  192. if v.Name==index then
  193. local Weld=Instance.new("Weld",v)
  194. Weld.Part0=Projectile.Handle
  195. Weld.Part1=v
  196. Weld.C0=data[1]
  197. Weld.C1=data[2]
  198. end
  199. v.CanCollide=false
  200. v.Velocity=AimDir*ThrowVel
  201. v.RotVelocity=Vector3.new(math.random(-ThrowVel,ThrowVel),math.random(-ThrowVel,ThrowVel),math.random(-ThrowVel,ThrowVel))
  202. end
  203. end
  204. Projectile.Name="Projectile_Jarate"
  205. Projectile.Parent=workspace
  206. Projectile.Handle.CFrame=Handle.CFrame
  207. setAlpha(1)
  208. Projectile.Handle.Touched:connect(function(hit)
  209. if not hit:IsDescendantOf(Player.Character) then
  210. soundPlay(Projectile,Sounds.Break)
  211. markTargets(Projectile.Handle.Position,MaxRange)
  212. Projectile:remove()
  213. end
  214. end)
  215.  
  216. end
  217.  
  218. --Main handler function thing
  219. Tool.Activated:connect(function()
  220. if _G.Jarate["Ready"]==true then
  221. local getRandomSound=function() sounds={Sounds.Throw1,Sounds.Throw2,Sounds.Throw3} return sounds[math.random(1,#sounds)] end
  222. soundPlay(Player.Character.Head,getRandomSound())
  223. _G.Jarate["Ready"]=false
  224. ThrowJarate()
  225. CurrentWait=MaxWait
  226.  
  227. end
  228. end)
  229. gui=script.AmmoGui
  230. Tool.Equipped:connect(function()
  231. gui.Parent=Player.PlayerGui
  232. end)
  233. Tool.Unequipped:connect(function()
  234. gui.Parent=script
  235. end)
  236. CurrentWait=0
  237. Ammo=script.AmmoGui.AmmoContainer.Background.Status
  238. while wait(1) do
  239. if CurrentWait>0 then
  240. CurrentWait=CurrentWait-1
  241. Ammo.BackgroundColor3=Color3.new(172/255,0,0)
  242. else _G.Jarate["Ready"]=true setAlpha(0) Ammo.BackgroundColor3=Color3.new(0,172/255,172/255) end
  243. Ammo.Size=UDim2.new(1-(CurrentWait/MaxWait),0,1,0)
  244. end
  245.  
  246. end))
  247. ScreenGui3.Name = "AmmoGui"
  248. ScreenGui3.Parent = LocalScript2
  249. ImageLabel4.Name = "AmmoContainer"
  250. ImageLabel4.Parent = ScreenGui3
  251. ImageLabel4.Transparency = 1
  252. ImageLabel4.Size = UDim2.new(0.150000006, 0, 0.125, 0)
  253. ImageLabel4.Position = UDim2.new(0.850000024, 0, 0.875, 0)
  254. ImageLabel4.BackgroundColor3 = Color3.new(0, 0.67451, 0.67451)
  255. ImageLabel4.BackgroundTransparency = 1
  256. ImageLabel4.Image = "http://www.roblox.com/asset/?id=130137440"
  257. ImageLabel5.Name = "Background"
  258. ImageLabel5.Parent = ImageLabel4
  259. ImageLabel5.Size = UDim2.new(0.600000024, 0, 0.150000006, 0)
  260. ImageLabel5.Position = UDim2.new(0.200000003, 0, 0.5, 0)
  261. ImageLabel5.BackgroundColor3 = Color3.new(0.490196, 0.490196, 0.490196)
  262. ImageLabel5.BorderSizePixel = 0
  263. ImageLabel5.ZIndex = 2
  264. ImageLabel6.Name = "Status"
  265. ImageLabel6.Parent = ImageLabel5
  266. ImageLabel6.Size = UDim2.new(0.5, 0, 1, 0)
  267. ImageLabel6.BackgroundColor3 = Color3.new(1, 1, 1)
  268. ImageLabel6.BorderSizePixel = 0
  269. ImageLabel6.ZIndex = 3
  270. Script7.Name = "Jarate"
  271. Script7.Parent = LocalScript2
  272. Script7.Disabled = true
  273. table.insert(cors,sandbox(Script7,function()
  274. --This is the localscript that's dumped into other players' characters
  275. --when they get hit by jarate
  276. DamageMag=1.5 --default 1.5, sets how much more damage
  277. JarateTime=45 --jarate length
  278. Humanoid=script.Parent
  279. Connections={}
  280. Colors={}
  281. script.Changed:connect(function()
  282. if script.Parent~=Humanoid then
  283. for _,v in pairs(Connections) do
  284. v:disconnect()
  285. end
  286. end
  287. end)
  288. lasthealth=Humanoid.Health
  289. table.insert(Connections,
  290. Humanoid.HealthChanged:connect(function(health)
  291. print(health,lasthealth)
  292. if lasthealth~=math.floor(health) then
  293. local Damage=lasthealth-health
  294. if Damage>0 then
  295. lasthealth=math.floor(lasthealth-Damage*DamageMag)
  296. Humanoid.Health=lasthealth
  297. else
  298. lasthealth=math.floor(Humanoid.Health)
  299. end
  300. end
  301. end))
  302. function scan(a)
  303. if a:IsA("BasePart") then
  304. Colors[a]=a.Color
  305. a.Color=Color3.new(a.Color.r+128/255,a.Color.g+128/255,a.Color.b)
  306. table.insert(Connections,a.Changed:connect(function(prop)
  307. if prop=="Color" then
  308. Colors[a]=a.Color
  309. end
  310. end))
  311. end
  312. for _,v in pairs(a:GetChildren()) do
  313. scan(v)
  314. end
  315. end
  316. scan(Humanoid.Parent)
  317.  
  318. wait(JarateTime)
  319. for ent,color in pairs(Colors) do
  320. ent.Color=color
  321. end
  322. script:remove()
  323. end))
  324. Part8.Name = "Handle"
  325. Part8.Parent = Tool0
  326. Part8.BrickColor = BrickColor.new("Pastel light blue")
  327. Part8.Transparency = 0.30000001192093
  328. Part8.Rotation = Vector3.new(180, 0, -180)
  329. Part8.FormFactor = Enum.FormFactor.Custom
  330. Part8.Size = Vector3.new(0.800000012, 1.10000074, 0.800000012)
  331. Part8.CFrame = CFrame.new(-20.4799995, 0.832017004, -34.0099983, -1, 0, -0, -0, 1, -0, -0, 0, -1)
  332. Part8.BottomSurface = Enum.SurfaceType.Smooth
  333. Part8.TopSurface = Enum.SurfaceType.Smooth
  334. Part8.Color = Color3.new(0.686275, 0.866667, 1)
  335. Part8.Position = Vector3.new(-20.4799995, 0.832017004, -34.0099983)
  336. Part8.Orientation = Vector3.new(0, -180, 0)
  337. Part8.Color = Color3.new(0.686275, 0.866667, 1)
  338. SpecialMesh9.Parent = Part8
  339. SpecialMesh9.MeshId = "http://www.roblox.com/asset/?id=115289510"
  340. SpecialMesh9.TextureId = "http://www.roblox.com/asset?id=115340918"
  341. SpecialMesh9.MeshType = Enum.MeshType.FileMesh
  342. Sound10.Name = "Throw"
  343. Sound10.Parent = Part8
  344. Sound10.SoundId = "http://www.roblox.com/asset/?id=130778789"
  345. Sound10.Volume = 1
  346. Part11.Name = "Lid"
  347. Part11.Parent = Tool0
  348. Part11.Material = Enum.Material.Foil
  349. Part11.Rotation = Vector3.new(180, 0, -180)
  350. Part11.CanCollide = false
  351. Part11.FormFactor = Enum.FormFactor.Custom
  352. Part11.Size = Vector3.new(0.800000012, 0.200000003, 0.800000012)
  353. Part11.CFrame = CFrame.new(-20.4799995, 1.43200696, -34.0099983, -1, 0, -0, -0, 1, -0, -0, 0, -1)
  354. Part11.BottomSurface = Enum.SurfaceType.Smooth
  355. Part11.TopSurface = Enum.SurfaceType.Smooth
  356. Part11.Position = Vector3.new(-20.4799995, 1.43200696, -34.0099983)
  357. Part11.Orientation = Vector3.new(0, -180, 0)
  358. SpecialMesh12.Parent = Part11
  359. SpecialMesh12.MeshId = "http://www.roblox.com/asset/?id=115296503"
  360. SpecialMesh12.TextureId = "http://www.roblox.com/asset?id=115340918"
  361. SpecialMesh12.MeshType = Enum.MeshType.FileMesh
  362. Part13.Name = "Urine"
  363. Part13.Parent = Tool0
  364. Part13.Material = Enum.Material.SmoothPlastic
  365. Part13.BrickColor = BrickColor.new("Bright yellow")
  366. Part13.Transparency = 0.30000001192093
  367. Part13.Anchored = true
  368. Part13.CanCollide = false
  369. Part13.FormFactor = Enum.FormFactor.Custom
  370. Part13.Size = Vector3.new(0.619999826, 1.14999998, 0.719999611)
  371. Part13.CFrame = CFrame.new(-20.4780006, 0.575016975, -34.0099983, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  372. Part13.BottomSurface = Enum.SurfaceType.Smooth
  373. Part13.TopSurface = Enum.SurfaceType.Smooth
  374. Part13.Color = Color3.new(0.960784, 0.803922, 0.188235)
  375. Part13.Position = Vector3.new(-20.4780006, 0.575016975, -34.0099983)
  376. Part13.Color = Color3.new(0.960784, 0.803922, 0.188235)
  377. SpecialMesh14.Parent = Part13
  378. SpecialMesh14.Scale = Vector3.new(1.5, 1, 1.10000002)
  379. SpecialMesh14.Scale = Vector3.new(1.5, 1, 1.10000002)
  380. Script15.Name = "Welding"
  381. Script15.Parent = Tool0
  382. table.insert(cors,sandbox(Script15,function()
  383. function Weld(x,y)
  384. local W = Instance.new("Weld")
  385. W.Part0 = x
  386. W.Part1 = y
  387. local CJ = CFrame.new(x.Position)
  388. local C0 = x.CFrame:inverse()*CJ
  389. local C1 = y.CFrame:inverse()*CJ
  390. W.C0 = C0
  391. W.C1 = C1
  392. W.Parent = x
  393. end
  394.  
  395. function Get(A)
  396. if A.className == "Part" then
  397. Weld(script.Parent.Handle, A)
  398. A.Anchored = false
  399. else
  400. local C = A:GetChildren()
  401. for i=1, #C do
  402. Get(C[i])
  403. end
  404. end
  405. end
  406.  
  407. function Finale()
  408. Get(script.Parent)
  409. end
  410.  
  411. script.Parent.Equipped:connect(Finale)
  412. script.Parent.Unequipped:connect(Finale)
  413. Finale()
  414. end))
  415. Script16.Name = "Welding"
  416. Script16.Parent = Tool0
  417. table.insert(cors,sandbox(Script16,function()
  418. function Weld(x,y)
  419. local W = Instance.new("Weld")
  420. W.Part0 = x
  421. W.Part1 = y
  422. local CJ = CFrame.new(x.Position)
  423. local C0 = x.CFrame:inverse()*CJ
  424. local C1 = y.CFrame:inverse()*CJ
  425. W.C0 = C0
  426. W.C1 = C1
  427. W.Parent = x
  428. end
  429.  
  430. function Get(A)
  431. if A.className == "Part" then
  432. Weld(script.Parent.Handle, A)
  433. A.Anchored = false
  434. else
  435. local C = A:GetChildren()
  436. for i=1, #C do
  437. Get(C[i])
  438. end
  439. end
  440. end
  441.  
  442. function Finale()
  443. Get(script.Parent)
  444. end
  445.  
  446. script.Parent.Equipped:connect(Finale)
  447. script.Parent.Unequipped:connect(Finale)
  448. Finale()
  449. end))
  450. LocalScript17.Name = "BackupWeld"
  451. LocalScript17.Parent = Tool0
  452. table.insert(cors,sandbox(LocalScript17,function()
  453. function Weld(x,y)
  454. local W = Instance.new("Weld")
  455. W.Part0 = x
  456. W.Part1 = y
  457. local CJ = CFrame.new(x.Position)
  458. local C0 = x.CFrame:inverse()*CJ
  459. local C1 = y.CFrame:inverse()*CJ
  460. W.C0 = C0
  461. W.C1 = C1
  462. W.Parent = x
  463. end
  464.  
  465. function Get(A)
  466. if A.className == "Part" then
  467. Weld(script.Parent.Handle, A)
  468. A.Anchored = false
  469. else
  470. local C = A:GetChildren()
  471. for i=1, #C do
  472. Get(C[i])
  473. end
  474. end
  475. end
  476.  
  477. function Finale()
  478. Get(script.Parent)
  479. end
  480.  
  481. script.Parent.Equipped:connect(Finale)
  482. script.Parent.Unequipped:connect(Finale)
  483. Finale()
  484. end))
  485. LocalScript18.Name = "BackupWeld"
  486. LocalScript18.Parent = Tool0
  487. table.insert(cors,sandbox(LocalScript18,function()
  488. function Weld(x,y)
  489. local W = Instance.new("Weld")
  490. W.Part0 = x
  491. W.Part1 = y
  492. local CJ = CFrame.new(x.Position)
  493. local C0 = x.CFrame:inverse()*CJ
  494. local C1 = y.CFrame:inverse()*CJ
  495. W.C0 = C0
  496. W.C1 = C1
  497. W.Parent = x
  498. end
  499.  
  500. function Get(A)
  501. if A.className == "Part" then
  502. Weld(script.Parent.Handle, A)
  503. A.Anchored = false
  504. else
  505. local C = A:GetChildren()
  506. for i=1, #C do
  507. Get(C[i])
  508. end
  509. end
  510. end
  511.  
  512. function Finale()
  513. Get(script.Parent)
  514. end
  515.  
  516. script.Parent.Equipped:connect(Finale)
  517. script.Parent.Unequipped:connect(Finale)
  518. Finale()
  519. end))
  520. for i,v in pairs(mas:GetChildren()) do
  521. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  522. pcall(function() v:MakeJoints() end)
  523. end
  524. mas:Destroy()
  525. for i,v in pairs(cors) do
  526. spawn(function()
  527. pcall(v)
  528. end)
  529. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement