Advertisement
End_Wolf

Untitled

Jul 5th, 2018
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. Part1 = Instance.new("Part")
  21. SpecialMesh2 = Instance.new("SpecialMesh")
  22. ManualWeld3 = Instance.new("ManualWeld")
  23. Animation4 = Instance.new("Animation")
  24. Animation5 = Instance.new("Animation")
  25. Part6 = Instance.new("Part")
  26. Sound7 = Instance.new("Sound")
  27. SpecialMesh8 = Instance.new("SpecialMesh")
  28. Script9 = Instance.new("Script")
  29. NumberValue10 = Instance.new("NumberValue")
  30. LocalScript11 = Instance.new("LocalScript")
  31. LocalScript12 = Instance.new("LocalScript")
  32. LocalScript13 = Instance.new("LocalScript")
  33. Script14 = Instance.new("Script")
  34. Tool0.Name = "StickyJumper"
  35. Tool0.Parent = mas
  36. Tool0.TextureId = "http://www.roblox.com/asset?id=123880862"
  37. Tool0.Grip = CFrame.new(0, -0.349999994, 0.75, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  38. Tool0.GripPos = Vector3.new(0, -0.349999994, 0.75)
  39. Tool0.ToolTip = "jump far away from here"
  40. Part1.Name = "part"
  41. Part1.Parent = Tool0
  42. Part1.CFrame = CFrame.new(15.4799957, 0.600000024, 1.59500206, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  43. Part1.Position = Vector3.new(15.4799957, 0.600000024, 1.59500206)
  44. Part1.Size = Vector3.new(0.820002317, 1.20000005, 2.24999952)
  45. Part1.FormFactor = Enum.FormFactor.Custom
  46. Part1.formFactor = Enum.FormFactor.Custom
  47. SpecialMesh2.Parent = Part1
  48. SpecialMesh2.MeshId = "http://www.roblox.com/asset?id=123881008"
  49. SpecialMesh2.TextureId = "http://www.roblox.com/asset?id=124226363"
  50. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  51. ManualWeld3.Name = "BulletWeld"
  52. ManualWeld3.Parent = Part1
  53. ManualWeld3.C1 = CFrame.new(-0.0199432373, -0.12487793, 0.885015488, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  54. ManualWeld3.Part0 = Part1
  55. ManualWeld3.Part1 = Part6
  56. ManualWeld3.part1 = Part6
  57. Animation4.Name = "EquipAnim"
  58. Animation4.Parent = Tool0
  59. Animation4.AnimationId = "http://www.roblox.com/asset?id=123895982"
  60. Animation5.Name = "FireAnim"
  61. Animation5.Parent = Tool0
  62. Animation5.AnimationId = "http://www.roblox.com/asset?id=123896085"
  63. Part6.Name = "Handle"
  64. Part6.Parent = Tool0
  65. Part6.CFrame = CFrame.new(15.499939, 0.724877954, 0.709986567, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  66. Part6.Position = Vector3.new(15.499939, 0.724877954, 0.709986567)
  67. Part6.Size = Vector3.new(0.319999993, 0.319999993, 0.319999993)
  68. Part6.BottomSurface = Enum.SurfaceType.Smooth
  69. Part6.CanCollide = false
  70. Part6.TopSurface = Enum.SurfaceType.Smooth
  71. Part6.FormFactor = Enum.FormFactor.Custom
  72. Part6.formFactor = Enum.FormFactor.Custom
  73. Sound7.Name = "SlingshotSound"
  74. Sound7.Parent = Part6
  75. Sound7.SoundId = "http://roblox.com/asset/?id=10209888"
  76. Sound7.Volume = 1
  77. SpecialMesh8.Parent = Part6
  78. SpecialMesh8.MeshType = Enum.MeshType.Sphere
  79. Script9.Name = "Bomb"
  80. Script9.Parent = Tool0
  81. table.insert(cors,sandbox(Script9,function()
  82. updateInterval = 0.4
  83.  
  84. currentColor = 1
  85. colors = {26, 21}
  86.  
  87. function onTouched(hit)
  88. local weld = Instance.new("Weld")
  89. weld.Part0 = script.Parent
  90. weld.Part1 = hit
  91. local temp = CFrame.new((script.Parent.Position + hit.Position) * 0.5)
  92. weld.C0 = script.Parent.CFrame:inverse() * temp
  93. weld.C1 = hit.CFrame:inverse() * temp
  94. weld.Parent = script.Parent
  95. script.Parent.Velocity = Vector3.new(0,0,0)
  96. script.Parent.RotVelocity = Vector3.new(0,0,0)
  97. connection:disconnect()
  98. end
  99.  
  100. connection = script.Parent.Touched:connect(onTouched)
  101.  
  102.  
  103.  
  104. end))
  105. Script9.Disabled = true
  106. NumberValue10.Name = "Tutorialized"
  107. NumberValue10.Parent = Tool0
  108. NumberValue10.Value = 14
  109. LocalScript11.Parent = Tool0
  110. table.insert(cors,sandbox(LocalScript11,function()
  111. local Tool = script.Parent;
  112. local db = script.Parent.Tutorialized
  113.  
  114. --Editable Section
  115. local maxBombs = 4 -- Change this to be able to add more bombs.
  116.  
  117. local explosionRadius = 10 -- Radius of 12 currently
  118. local explosionPressure = 1000000 -- Really high pressure that packs a punch!
  119. local DestroyJointRadiusPercent = 0
  120. --End of editable section
  121.  
  122. --I don't recommend that you edit anything beyond this point.
  123.  
  124. function onKeyDown(key)
  125. if (key~=nil) then
  126. key = key:lower()
  127. local bomb = getBombs()
  128. if (key=="q") then
  129. for i=1, #bomb do
  130. blowUp(bomb[i])
  131. end
  132. end
  133. if (key=="r") then
  134. for i=1, #bomb do
  135. bomb[i]:remove()
  136. end
  137. end
  138. end
  139. end
  140.  
  141. function getBombs()
  142. local bombs = {}
  143. for i,child in pairs(workspace:getChildren()) do
  144. if child.Name == ""..script.Parent.Parent.Name.." Bomb" then
  145. table.insert(bombs, child)
  146. end
  147. end
  148. return bombs
  149. end
  150.  
  151. enabled = true
  152. function onButton1Down(mouse)
  153. if not enabled then
  154. return
  155. end
  156.  
  157. enabled = false
  158. mouse.Icon = "http://www.roblox.com/asset/?id=19086766"
  159.  
  160. wait(3)
  161. mouse.Icon = "http://www.roblox.com/asset/?id=19086766"
  162. enabled = true
  163.  
  164. end
  165.  
  166. function onEquippedLocal(mouse)
  167.  
  168. if mouse == nil then
  169. print("Mouse not found")
  170. return
  171. end
  172.  
  173. mouse.Icon = "http://www.roblox.com/asset/?id=19086766"
  174. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  175. mouse.KeyDown:connect(onKeyDown)
  176.  
  177. if db.Value == 0 then
  178. db.Value = 14
  179. local message = Instance.new("Hint")
  180. message.Parent = game.Players:findFirstChild(script.Parent.Parent.Name)
  181. message.Text = "Thanks for using C4 by Malvaviscos"
  182. wait(3)
  183. message.Text = "Click to drop C4 (Fires like a slingshot)"
  184. wait(3)
  185. message.Text = "Press 'q' to detonate the C4, and 'r' to remove it."
  186. wait(3)
  187. message.Text = "You are allowed to have up to "..maxBombs.." bomb(s) out at a time"
  188. wait(4)
  189. message:remove()
  190. end
  191. end
  192.  
  193. function blowUp(obj)
  194. local sound = Instance.new("Sound")
  195. sound.SoundId = "http://roblox.com/asset/?id=10209886"
  196. sound.Parent = obj
  197. sound.Volume = 1
  198. sound.Pitch = 1
  199. sound:play()
  200. explosion = Instance.new("Explosion")
  201. explosion.BlastRadius = explosionRadius
  202. explosion.BlastPressure = explosionPressure -- these are really wussy units
  203. explosion.DestroyJointRadiusPercent = DestroyJointRadiusPercent
  204.  
  205. -- find instigator tag
  206. local creator = Instance.new("ObjectValue")
  207. creator.Name = "creator"
  208. creator.Value = game.Players.LocalPlayer
  209. if creator ~= nil then
  210. explosion.Hit:connect(function(part, distance) onPlayerBlownUp(part, distance, creator) end)
  211. end
  212.  
  213. explosion.Position = obj.Position
  214. explosion.Parent = game.Workspace
  215.  
  216. obj:remove()
  217. end
  218.  
  219. function onPlayerBlownUp(part, distance, creator)
  220. if part.Name == "Head" then
  221. local humanoid = part.Parent:findFirstChild("Humanoid")
  222. tagHumanoid(humanoid, creator)
  223. end
  224. end
  225.  
  226. function tagHumanoid(humanoid, creator)
  227. -- tag does not need to expire iff all explosions lethal
  228.  
  229. if creator ~= nil and humanoid ~= nil then
  230. local new_tag = creator:clone()
  231. new_tag.Parent = humanoid
  232. end
  233. end
  234.  
  235. function untagHumanoid(humanoid)
  236. if humanoid ~= nil then
  237. local tag = humanoid:findFirstChild("creator")
  238. if tag ~= nil then
  239. tag.Parent = nil
  240. end
  241. end
  242. end
  243.  
  244. Tool.Equipped:connect(onEquippedLocal)
  245.  
  246. Tool = script.Parent
  247. VELOCITY = 85 -- constant
  248.  
  249. local Pellet = script.Parent.Handle:clone()
  250. Pellet.Locked = true
  251. Pellet.BackSurface = 0
  252. Pellet.BottomSurface = 0
  253. Pellet.FrontSurface = 0
  254. Pellet.LeftSurface = 0
  255. Pellet.RightSurface = 0
  256. Pellet.TopSurface = 0
  257. Pellet.SlingshotSound:remove()
  258. script.Parent.Bomb:clone().Parent = Pellet
  259.  
  260. function fire(mouse_pos)
  261.  
  262.  
  263. Tool.Handle.SlingshotSound:play()
  264.  
  265. -- find player's head pos
  266.  
  267. local vCharacter = Tool.Parent
  268. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  269.  
  270. local head = vCharacter:findFirstChild("Head")
  271. if head == nil then return end
  272.  
  273. local dir = mouse_pos - head.Position
  274. dir = computeDirection(dir)
  275.  
  276. local launch = head.Position + 5 * dir
  277.  
  278. local delta = mouse_pos - launch
  279.  
  280. local dy = delta.y
  281.  
  282. local new_delta = Vector3.new(delta.x, 0, delta.z)
  283. delta = new_delta
  284.  
  285. local dx = delta.magnitude
  286. local unit_delta = delta.unit
  287.  
  288. -- acceleration due to gravity in RBX units
  289. local g = (-9.81 * 20)
  290.  
  291. local theta = computeLaunchAngle( dx, dy, g)
  292.  
  293. local vy = math.sin(theta)
  294. local xz = math.cos(theta)
  295. local vx = unit_delta.x * xz
  296. local vz = unit_delta.z * xz
  297.  
  298.  
  299. local missile = Pellet:clone()
  300.  
  301.  
  302.  
  303.  
  304. missile.Position = launch
  305. missile.Velocity = Vector3.new(vx,vy,vz) * VELOCITY
  306.  
  307. missile.Bomb.Disabled = false
  308.  
  309. local creator_tag = Instance.new("ObjectValue")
  310. creator_tag.Value = vPlayer
  311. creator_tag.Name = "creator"
  312. creator_tag.Parent = missile
  313.  
  314. missile.Parent = game.Workspace
  315.  
  316. end
  317.  
  318.  
  319. function computeLaunchAngle(dx,dy,grav)
  320. -- arcane
  321. -- http://en.wikipedia.org/wiki/Trajectory_of_a_projectile
  322.  
  323. local g = math.abs(grav)
  324. local inRoot = (VELOCITY*VELOCITY*VELOCITY*VELOCITY) - (g * ((g*dx*dx) + (2*dy*VELOCITY*VELOCITY)))
  325. if inRoot <= 0 then
  326. return .25 * math.pi
  327. end
  328. local root = math.sqrt(inRoot)
  329. local inATan1 = ((VELOCITY*VELOCITY) + root) / (g*dx)
  330.  
  331. local inATan2 = ((VELOCITY*VELOCITY) - root) / (g*dx)
  332. local answer1 = math.atan(inATan1)
  333. local answer2 = math.atan(inATan2)
  334. if answer1 < answer2 then return answer1 end
  335. return answer2
  336. end
  337.  
  338. function computeDirection(vec)
  339. local lenSquared = vec.magnitude * vec.magnitude
  340. local invSqrt = 1 / math.sqrt(lenSquared)
  341. return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
  342. end
  343.  
  344.  
  345.  
  346.  
  347. Tool.Enabled = true
  348. function onActivated()
  349.  
  350. if not Tool.Enabled or #getBombs() >= maxBombs then
  351. return
  352. end
  353. Pellet.Name = ""..script.Parent.Parent.Name.." Bomb"
  354. Tool.Enabled = false
  355.  
  356. local character = Tool.Parent;
  357. local humanoid = character.Humanoid
  358. if humanoid == nil then
  359. print("Humanoid not found")
  360. return
  361. end
  362.  
  363. local targetPos = humanoid.TargetPoint
  364.  
  365. fire(targetPos)
  366.  
  367. wait(.5)
  368.  
  369. Tool.Enabled = true
  370. end
  371.  
  372. script.Parent.Activated:connect(onActivated)
  373.  
  374.  
  375.  
  376. end))
  377. LocalScript12.Name = "Spark"
  378. LocalScript12.Parent = Tool0
  379. table.insert(cors,sandbox(LocalScript12,function()
  380. local Tool = script.Parent;
  381.  
  382.  
  383.  
  384. enabled = true
  385.  
  386. function onButton1Down(mouse)
  387.  
  388. if not enabled then
  389.  
  390. return
  391.  
  392. end
  393.  
  394. enabled = false
  395. Tool.Smoke:clone().Parent = Tool.Smoker
  396. Tool.Fire:clone().Parent = Tool.Smoker
  397.  
  398. wait(.25)
  399.  
  400. Tool.Smoker.Smoke:remove()
  401. Tool.Smoker.Fire:remove()
  402.  
  403. wait(.25)
  404.  
  405. enabled = true
  406.  
  407. end
  408.  
  409.  
  410.  
  411. function onEquippedLocal(mouse)
  412.  
  413.  
  414.  
  415. if mouse == nil then
  416.  
  417. print("Mouse not found")
  418.  
  419. return
  420.  
  421. end
  422.  
  423.  
  424.  
  425. mouse.Icon = "http://www.roblox.com/asset/?id=19086766"
  426.  
  427. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  428.  
  429. end
  430.  
  431.  
  432.  
  433.  
  434.  
  435. Tool.Equipped:connect(onEquippedLocal)
  436.  
  437.  
  438. end))
  439. LocalScript13.Name = "TurnScript"
  440. LocalScript13.Parent = Tool0
  441. table.insert(cors,sandbox(LocalScript13,function()
  442. wait()
  443. Tool=script.Parent
  444. CP,Torso,g=nil,nil,nil
  445. necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  446. getPos=function(Pos,TorsoPos)
  447. return Vector3.new(Pos.x,TorsoPos.y,Pos.z)
  448. end
  449. Turn=function(mouse,Torso,Gyro)
  450. g.cframe=CFrame.new(Torso.Position,getPos(mouse.Hit.p,Torso.Position))
  451. offset=(Torso.Position.y-mouse.Hit.p.y)/100
  452. mag=(Torso.Position-mouse.Hit.p).magnitude/80
  453. offset=offset/mag
  454. neck=Torso.Neck
  455. neck.C0=necko*CFrame.fromEulerAnglesXYZ(offset,0,0)
  456. arm=Torso:FindFirstChild("Right Shoulder")
  457. if arm~=nil then
  458. arm.C0=CFrame.new(1, 0.5, 0, 0, 0, 1, -6.48200512e-007, 1.00000274, 0, -1.00000274, -6.48200512e-007, 0)*CFrame.fromEulerAnglesXYZ(0,0,-offset)
  459. end
  460. end
  461. Equi=function(mouse)
  462. wait(.2)
  463. CP=Tool.Parent
  464. Torso=CP.Torso
  465. g=Instance.new("BodyGyro")
  466. g.P=18000
  467. g.D=600
  468. g.maxTorque=Vector3.new(80000,80000000,80000)*50000000000000000000000000
  469. g.cframe=Torso.CFrame
  470. g.Parent=Torso
  471. while true do
  472. if Tool.Parent.className~="Model" then
  473. break
  474. end
  475. Turn(mouse,Torso,g)
  476. wait()
  477. end
  478. Torso.Neck.C0=necko
  479. g:Remove()
  480. end
  481. Tool.Equipped:connect(Equi)
  482. end))
  483. Script14.Parent = Tool0
  484. table.insert(cors,sandbox(Script14,function()
  485. local billboard = Instance.new("BillboardGui")
  486. billboard.Archivable = false
  487. billboard.Size = UDim2.new(2,0,2,0) -- 10 studs by 10 studs
  488.  
  489. local frm = Instance.new("Frame")
  490. frm.BackgroundTransparency = 1
  491. frm.Size = UDim2.new(1,0,1,0)
  492. frm.Parent = billboard
  493. billboard.Parent = script.Parent
  494. billboard.Adornee = script.Parent
  495.  
  496. function SpawnEffect(imgId)
  497. b = Instance.new("ImageLabel")
  498. b.BackgroundTransparency = 1
  499. b.Size = UDim2.new(0,0,0,0)
  500. b.Position = UDim2.new(0.5,0,0.5,0)
  501. if tonumber(imgId) == nil then --if rbxasset address then set as-is
  502. b.Image = imgId
  503. else --the imgID is an integer so add it on the base URL
  504. b.Image = "http://www.roblox.com/asset?id=" .. tostring(imgId)
  505. end
  506. b.Parent = frm
  507. return b
  508. end
  509.  
  510. while true do
  511. wait(.01) --emit a particle every 2 seconds
  512. l = Instance.new("PointLight") --create light effect
  513. l.Archivable = false
  514. l.Parent = script.Parent
  515. l.Brightness = 0
  516. q = {}
  517. for i = 1, 10 do
  518. q[i] = SpawnEffect(163324282)
  519. game:GetService("Debris"):AddItem(q[i],i/40)
  520. q[i]:TweenSizeAndPosition(UDim2.new(1,0, 1, 0), UDim2.new(0, 0, 0, 0), "Out", "Linear", .25, false, nil)
  521. end
  522. for i = 1, 10 do
  523. wait(.05)
  524. l.Brightness = 10-i
  525. end
  526. l:Remove() --remove the light
  527. end
  528. end))
  529. Script14.Disabled = true
  530. for i,v in pairs(mas:GetChildren()) do
  531. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  532. pcall(function() v:MakeJoints() end)
  533. end
  534. mas:Destroy()
  535. for i,v in pairs(cors) do
  536. spawn(function()
  537. pcall(v)
  538. end)
  539. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement