Advertisement
popster12345

Untitled

Feb 8th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.59 KB | None | 0 0
  1. Plrs = game:GetService("Players")
  2.  
  3. me = Plrs.monsterjam12clone
  4.  
  5. char = me.Character
  6.  
  7. Modelname = "xBananaz"
  8.  
  9. Toolname = "Banana"
  10.  
  11. Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"}
  12.  
  13. necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  14.  
  15. selected = false
  16.  
  17. Able = true
  18.  
  19. Prop = {Damage = 30}
  20.  
  21.  
  22.  
  23. ToolIcon = ""
  24.  
  25. MouseIc = ""
  26.  
  27. MouseDo = ""
  28.  
  29.  
  30.  
  31. function Notime(func, tim)
  32.  
  33. coroutine.resume(coroutine.create(function()
  34.  
  35. if tim then
  36.  
  37. wait(tim)
  38.  
  39. end
  40.  
  41. func()
  42.  
  43. end))
  44.  
  45. end
  46.  
  47.  
  48.  
  49. Add = {
  50.  
  51. Sphere = function(P)
  52.  
  53. local m = Instance.new("SpecialMesh",P)
  54.  
  55. m.MeshType = "Sphere"
  56.  
  57. return m
  58.  
  59. end,
  60.  
  61. BF = function(P)
  62.  
  63. local bf = Instance.new("BodyForce",P)
  64.  
  65. bf.force = Vector3.new(0, P:GetMass()*187, 0)
  66.  
  67. return bf
  68.  
  69. end,
  70.  
  71. BP = function(P)
  72.  
  73. local bp = Instance.new("BodyPosition",P)
  74.  
  75. bp.maxForce = Vector3.new(math.huge, 0, math.huge)
  76.  
  77. bp.P = 14000
  78.  
  79. return bp
  80.  
  81. end,
  82.  
  83. BG = function(P)
  84.  
  85. local bg = Instance.new("BodyGyro",P)
  86.  
  87. bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  88.  
  89. bg.P = 14000
  90.  
  91. return bg
  92.  
  93. end,
  94.  
  95. Mesh = function(P, ID, x, y, z)
  96.  
  97. local m = Instance.new("SpecialMesh")
  98.  
  99. m.MeshId = ID
  100.  
  101. m.Scale = Vector3.new(x, y, z)
  102.  
  103. m.Parent = P
  104.  
  105. return m
  106.  
  107. end,
  108.  
  109. Sound = function(P, ID, vol, pitch)
  110.  
  111. local s = Instance.new("Sound")
  112.  
  113. s.SoundId = ID
  114.  
  115. s.Volume = vol
  116.  
  117. s.Pitch = pitch
  118.  
  119. s.Parent = P
  120.  
  121. return s
  122.  
  123. end
  124.  
  125. }
  126.  
  127.  
  128.  
  129. function find(tab, arg)
  130.  
  131. local ah = nil
  132.  
  133. for i,v in pairs(tab) do
  134.  
  135. if v == arg then
  136.  
  137. ah = v
  138.  
  139. end
  140.  
  141. end
  142.  
  143. return ah
  144.  
  145. end
  146.  
  147.  
  148.  
  149. function getAllParts(from)
  150.  
  151. local t = {}
  152.  
  153. function getParts(where)
  154.  
  155. for i, v in pairs(where:children()) do
  156.  
  157. if v:IsA("BasePart") then
  158.  
  159. if v.Parent ~= char and v.Parent.Parent ~= char then
  160.  
  161. table.insert(t, v)
  162.  
  163. end
  164.  
  165. end
  166.  
  167. getParts(v)
  168.  
  169. end
  170.  
  171. end
  172.  
  173. getParts(workspace)
  174.  
  175. return t
  176.  
  177. end
  178.  
  179.  
  180.  
  181. function RayCast(pos1, pos2, maxDist, forward)
  182.  
  183. local list = getAllParts(workspace)
  184.  
  185. local pos0 = pos1
  186.  
  187. for dist = 1, maxDist, forward do
  188.  
  189. pos0 = (CFrame.new(pos1, pos2) * CFrame.new(0, 0, -dist)).p
  190.  
  191. for _, v in pairs(list) do
  192.  
  193. local pos3 = v.CFrame:pointToObjectSpace(pos0)
  194.  
  195. local s = v.Size
  196.  
  197. if pos3.x > -(s.x/2) and pos3.x < (s.x/2) and pos3.y > -(s.y/2) and pos3.y < (s.y/2) and pos3.z > -(s.z/2) and pos3.x < (s.z/2) and v.CanCollide == true then
  198.  
  199. return pos0, v
  200.  
  201. end
  202.  
  203. end
  204.  
  205. end
  206.  
  207. return pos0, nil
  208.  
  209. end
  210.  
  211.  
  212.  
  213. function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break)
  214.  
  215. local p = Instance.new("Part")
  216.  
  217. p.formFactor = "Custom"
  218.  
  219. p.Anchored = Anchor
  220.  
  221. p.CanCollide = Collide
  222.  
  223. p.Transparency = Tran
  224.  
  225. p.Reflectance = Ref
  226.  
  227. p.BrickColor = BrickColor.new(Color)
  228.  
  229. for _, Surf in pairs(Surfaces) do
  230.  
  231. p[Surf] = "Smooth"
  232.  
  233. end
  234.  
  235. p.Size = Vector3.new(X, Y, Z)
  236.  
  237. if Break then
  238.  
  239. p:BreakJoints()
  240.  
  241. else p:MakeJoints() end
  242.  
  243. p.Parent = Parent
  244.  
  245. return p
  246.  
  247. end
  248.  
  249.  
  250.  
  251. function Weld(p0, p1, x, y, z, a, b, c)
  252.  
  253. local w = Instance.new("Weld")
  254.  
  255. w.Parent = p0
  256.  
  257. w.Part0 = p0
  258.  
  259. w.Part1 = p1
  260.  
  261. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(a,b,c)
  262.  
  263. return w
  264.  
  265. end
  266.  
  267.  
  268.  
  269. function ComputePos(pos1, pos2)
  270.  
  271. local pos3 = Vector3.new(pos2.x, pos1.y, pos2.z)
  272.  
  273. return CFrame.new(pos1, pos3)
  274.  
  275. end
  276.  
  277.  
  278.  
  279. function getHumanoid(c)
  280.  
  281. local h = nil
  282.  
  283. for i,v in pairs(c:children()) do
  284.  
  285. if v:IsA("Humanoid") then
  286.  
  287. if v.Health > 0 then
  288.  
  289. h = v
  290.  
  291. end
  292.  
  293. end
  294.  
  295. end
  296.  
  297. return h
  298.  
  299. end
  300.  
  301.  
  302.  
  303. for i,v in pairs(char:children()) do
  304.  
  305. if v.Name == Modelname then
  306.  
  307. v:remove()
  308.  
  309. end
  310.  
  311. end
  312.  
  313.  
  314.  
  315. torso = char.Torso
  316.  
  317. neck = torso.Neck
  318.  
  319. hum = char.Humanoid
  320.  
  321. Rarm = char["Right Arm"]
  322.  
  323. Larm = char["Left Arm"]
  324.  
  325. Rleg = char["Right Leg"]
  326.  
  327. Lleg = char["Left Leg"]
  328.  
  329.  
  330.  
  331. hc = Instance.new("Humanoid")
  332.  
  333. hc.Health = 0
  334.  
  335. hc.MaxHealth = 0
  336.  
  337.  
  338.  
  339. slash = Add.Sound(nil, "rbxasset://sounds//swordslash.wav", 0.9, 0.8)
  340.  
  341. hitsound = Add.Sound(nil, "http://www.roblox.com/asset/?id=2801263", 0.7, 0.6)
  342.  
  343. charge = Add.Sound(nil, "http://www.roblox.com/asset/?id=2101137", 0.8, 0.65)
  344.  
  345. boom = Add.Sound(nil, "http://www.roblox.com/asset/?id=2691586", 0.8, 0.3)
  346.  
  347. smashsound = Add.Sound(nil, "http://www.roblox.com/asset/?id=2692806", 0.8, 0.35)
  348.  
  349. boomboom = Add.Sound(nil, "http://www.roblox.com/asset/?id=2760979", 1, 0.18)
  350.  
  351.  
  352.  
  353. function PlaySound(sound, pitch, vol)
  354.  
  355. local s = sound:clone()
  356.  
  357. if pitch ~= nil then
  358.  
  359. if tonumber(pitch) then
  360.  
  361. s.Pitch = tonumber(pitch)
  362.  
  363. end
  364.  
  365. end
  366.  
  367. if vol ~= nil then
  368.  
  369. if tonumber(vol) then
  370.  
  371. s.Volume = tonumber(vol)
  372.  
  373. end
  374.  
  375. end
  376.  
  377. s.Parent = torso
  378.  
  379. s.PlayOnRemove = true
  380.  
  381. coroutine.resume(coroutine.create(function()
  382.  
  383. wait()
  384.  
  385. s:remove()
  386.  
  387. end))
  388.  
  389. end
  390.  
  391.  
  392.  
  393. Mo = Instance.new("Model")
  394.  
  395. Mo.Name = Modelname
  396.  
  397.  
  398.  
  399. RABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  400.  
  401. LABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  402.  
  403. RLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  404.  
  405. LLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  406.  
  407.  
  408.  
  409. RABW = Weld(torso, RABrick, -1.5, -0.5, 0, 0, 0, 0)
  410.  
  411. LABW = Weld(torso, LABrick, 1.5, -0.5, 0, 0, 0, 0)
  412.  
  413. RLBW = Weld(torso, RLBrick, -0.5, 1.2, 0, 0, 0, 0)
  414.  
  415. LLBW = Weld(torso, LLBrick, 0.5, 1.2, 0, 0, 0, 0)
  416.  
  417.  
  418.  
  419. RAW = Weld(RABrick, nil, 0, 0.5, 0, 0, 0, 0)
  420.  
  421. LAW = Weld(LABrick, nil, 0, 0.5, 0, 0, 0, 0)
  422.  
  423. RLW = Weld(RLBrick, nil, 0, 0.8, 0, 0, 0, 0)
  424.  
  425. LLW = Weld(LLBrick, nil, 0, 0.8, 0, 0, 0, 0)
  426.  
  427.  
  428.  
  429. HB = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  430.  
  431. HBW = Weld(Rarm, HB, 0, 1, 0, 0, 0, 0)
  432.  
  433. HW = Weld(HB, nil, 0, 0.3, 0, math.pi/2, math.pi, 0)
  434.  
  435.  
  436.  
  437. Mo.Parent = char
  438.  
  439.  
  440.  
  441. function MakeBanana()
  442.  
  443. local Banana = Part(workspace, false, true, 0, 0, "Bright yellow", 0.9, 0.95, 0.9, true)
  444.  
  445. Banana.Friction = 0.8
  446.  
  447. Banana.Elasticity = 0
  448.  
  449. local mes = Add.Mesh(Banana, "http://www.roblox.com/asset/?id=28937301", 1.3, 0.8, 1.3)
  450.  
  451. mes.TextureId = "http://www.roblox.com/asset/?id=28937670"
  452.  
  453. HW.Part1 = Banana
  454.  
  455. return Banana
  456.  
  457. end
  458.  
  459.  
  460.  
  461. if script.Parent.className ~= "HopperBin" then
  462.  
  463. h = Instance.new("HopperBin",me.Backpack)
  464.  
  465. h.Name = Toolname
  466.  
  467. h.TextureId = ToolIcon
  468.  
  469. script.Parent = h
  470.  
  471. end
  472.  
  473.  
  474.  
  475. bin = script.Parent
  476.  
  477.  
  478.  
  479. function detach(bool)
  480.  
  481. LLW.C0 = CFrame.new(0, 0, 0)
  482.  
  483. RLW.C0 = CFrame.new(0, 0, 0)
  484.  
  485. LAW.C0 = CFrame.new(0,0,0)
  486.  
  487. RAW.C0 = CFrame.new(0, 0, 0)
  488.  
  489. if bool then
  490.  
  491. LLW.Part1 = nil
  492.  
  493. RLW.Part1 = nil
  494.  
  495. RAW.Part1 = nil
  496.  
  497. LAW.Part1 = nil
  498.  
  499. end
  500.  
  501. end
  502.  
  503.  
  504.  
  505. function attach()
  506.  
  507. RAW.Part1 = Rarm
  508.  
  509. LAW.Part1 = Larm
  510.  
  511. RLW.Part1 = Rleg
  512.  
  513. LLW.Part1 = Lleg
  514.  
  515. end
  516.  
  517.  
  518.  
  519. function normal()
  520.  
  521. neck.C0 = NeckStand
  522.  
  523. RAW.C0 = RAWStand
  524.  
  525. LAW.C0 = LAWStand
  526.  
  527. RLW.C0 = RLWStand
  528.  
  529. LLW.C0 = LLWStand
  530.  
  531. RAW.C1 = CFrame.new(0, 0.5, 0)
  532.  
  533. LAW.C1 = CFrame.new(0, 0.5, 0)
  534.  
  535. RLW.C1 = CFrame.new(0, 0.8, 0)
  536.  
  537. LLW.C1 = CFrame.new(0, 0.8, 0)
  538.  
  539. HW.C0 = HWStand
  540.  
  541. end
  542.  
  543.  
  544.  
  545. function throw(mousepos)
  546.  
  547. RAW.Part1 = Rarm
  548.  
  549. for i = 0, 1, 0.2 do
  550.  
  551. RAW.C0 = CFrame.Angles(math.rad(-5*i), 0, math.rad(-15*i)) * CFrame.new(0, -0.2*i, -0.5*i)
  552.  
  553. wait()
  554.  
  555. end
  556.  
  557. local banana = MakeBanana()
  558.  
  559. for i = 0, 1, 0.14 do
  560.  
  561. RAW.C0 = CFrame.Angles(math.rad(-5+185*i), 0, math.rad(-15+35*i)) * CFrame.new(0, -0.2+0.1*i, -0.5+0.8*i)
  562.  
  563. wait()
  564.  
  565. end
  566.  
  567. for i = 0, 1, 0.25 do
  568.  
  569. RAW.C0 = CFrame.Angles(math.rad(-5+185-90*i), 0, math.rad(-15+35-45*i)) * CFrame.new(0, -0.2+0.1-0.4*i, -0.5+0.8-0.3*i)
  570.  
  571. wait()
  572.  
  573. end
  574.  
  575. local pos = CFrame.new(banana.Position, mousepos) * CFrame.Angles(math.rad(25),0,0)
  576.  
  577. local mag = (torso.Position - mousepos).magnitude
  578.  
  579. mag = mag - (mag/5)
  580.  
  581. if mag > 25 then mag = 25 end
  582.  
  583. local kert = (40+(mag*2))
  584.  
  585. Notime(function()
  586.  
  587. HW.Part1 = nil
  588.  
  589. wait()
  590.  
  591. banana.Velocity = pos.lookVector * kert
  592.  
  593. local bg = Add.BG(banana)
  594.  
  595. bg.P = 4500
  596.  
  597. bg.maxTorque = Vector3.new(math.huge, 0, math.huge)
  598.  
  599. wait(0.5)
  600.  
  601. repeat wait() until banana.Velocity.magnitude < 13
  602.  
  603. local ablez = true
  604.  
  605. local con = banana.Touched:connect(function(hit)
  606.  
  607. local hu = getHumanoid(hit.Parent)
  608.  
  609. if hu then
  610.  
  611. local to = hu.Parent:findFirstChild("Torso")
  612.  
  613. if to and ablez then
  614.  
  615. ablez = false
  616.  
  617. local bg = Add.BG(to)
  618.  
  619. hu.PlatformStand = true
  620.  
  621. local cf1 = to.CFrame
  622.  
  623. local cf2 = CFrame.new(cf1.p, (cf1 * CFrame.new(0, 0, -2).p))
  624.  
  625. to.Velocity = to.Velocity + (cf1.lookVector * -15) + Vector3.new(0, 35, 0)
  626.  
  627. local ah = math.random(260,280)
  628.  
  629. local mm = math.random(5,8)/100
  630.  
  631. Notime(function()
  632.  
  633. wait(0.25)
  634.  
  635. ablez = true
  636.  
  637. end)
  638.  
  639. banana.Velocity = cf1.lookVector * 35
  640.  
  641. for i = 0, 1, mm do
  642.  
  643. bg.cframe = cf2 * CFrame.Angles(math.rad(ah*i), 0, 0)
  644.  
  645. wait()
  646.  
  647. end
  648.  
  649. wait()
  650.  
  651. bg:remove()
  652.  
  653. wait(0.4)
  654.  
  655. hu.PlatformStand = false
  656.  
  657. end
  658.  
  659. end
  660.  
  661. end)
  662.  
  663. wait(math.random(18,22))
  664.  
  665. con:disconnect()
  666.  
  667. for i = 0, 1, 0.033 do
  668.  
  669. banana.Transparency = i
  670.  
  671. wait()
  672.  
  673. end
  674.  
  675. banana:remove()
  676.  
  677. end)
  678.  
  679. for i = 0, 1, 0.16 do
  680.  
  681. RAW.C0 = CFrame.Angles(math.rad(-5+185-90-90*i), 0, math.rad(-15+35-45+25*i)) * CFrame.new(0, -0.2+0.1-0.4+0.5*i, 0)
  682.  
  683. wait()
  684.  
  685. end
  686.  
  687. detach(true)
  688.  
  689. end
  690.  
  691.  
  692.  
  693. function select(mouse)
  694.  
  695. selected = true
  696.  
  697. mouse.Button1Down:connect(function()
  698.  
  699. if Able then
  700.  
  701. Able = false
  702.  
  703. throw(mouse.Hit.p)
  704.  
  705. wait(0.5)
  706.  
  707. Able = true
  708.  
  709. end
  710.  
  711. end)
  712.  
  713. end
  714.  
  715.  
  716.  
  717. function deselect(mouse)
  718.  
  719. selected = false
  720.  
  721. end
  722.  
  723.  
  724.  
  725. bin.Selected:connect(select)
  726.  
  727. bin.Deselected:connect(deselect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement