Advertisement
BINO2002

Untitled

Feb 19th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.42 KB | None | 0 0
  1. Name = "BINO2002"
  2.  
  3. Plrs = game:GetService("Players")
  4.  
  5. me = Plrs[Name]
  6. char = me.Character
  7. Modelname = "xBananaz"
  8. Toolname = "Banana"
  9. Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"}
  10. necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  11. selected = false
  12. Able = true
  13. Order = 1
  14. Item = nil
  15. Items = {}
  16.  
  17. ToolIcon = ""
  18. MouseIc = ""
  19. MouseDo = ""
  20.  
  21. function Notime(func, tim)
  22. coroutine.resume(coroutine.create(function()
  23. if tim then
  24. wait(tim)
  25. end
  26. func()
  27. end))
  28. end
  29.  
  30. Add = {
  31. Sphere = function(P)
  32. local m = Instance.new("SpecialMesh",P)
  33. m.MeshType = "Sphere"
  34. return m
  35. end,
  36. BF = function(P)
  37. local bf = Instance.new("BodyForce",P)
  38. bf.force = Vector3.new(0, P:GetMass()*187, 0)
  39. return bf
  40. end,
  41. BP = function(P)
  42. local bp = Instance.new("BodyPosition",P)
  43. bp.maxForce = Vector3.new(math.huge, 0, math.huge)
  44. bp.P = 14000
  45. return bp
  46. end,
  47. BG = function(P)
  48. local bg = Instance.new("BodyGyro",P)
  49. bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  50. bg.P = 14000
  51. return bg
  52. end,
  53. Mesh = function(P, ID, x, y, z)
  54. local m = Instance.new("SpecialMesh")
  55. m.MeshId = ID
  56. m.Scale = Vector3.new(x, y, z)
  57. m.Parent = P
  58. return m
  59. end,
  60. Sound = function(P, ID, vol, pitch)
  61. local s = Instance.new("Sound")
  62. s.SoundId = ID
  63. s.Volume = vol
  64. s.Pitch = pitch
  65. s.Parent = P
  66. return s
  67. end
  68. }
  69.  
  70. function find(tab, arg)
  71. local ah = nil
  72. for i,v in pairs(tab) do
  73. if v == arg then
  74. ah = v
  75. end
  76. end
  77. return ah
  78. end
  79.  
  80. function getAllParts(from)
  81. local t = {}
  82. function getParts(where)
  83. for i, v in pairs(where:children()) do
  84. if v:IsA("BasePart") then
  85. if v.Parent ~= char and v.Parent.Parent ~= char then
  86. table.insert(t, v)
  87. end
  88. end
  89. getParts(v)
  90. end
  91. end
  92. getParts(workspace)
  93. return t
  94. end
  95.  
  96. function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break)
  97. local p = Instance.new("Part")
  98. p.formFactor = "Custom"
  99. p.Anchored = Anchor
  100. p.CanCollide = Collide
  101. p.Transparency = Tran
  102. p.Reflectance = Ref
  103. p.BrickColor = BrickColor.new(Color)
  104. for _, Surf in pairs(Surfaces) do
  105. p[Surf] = "Smooth"
  106. end
  107. p.Size = Vector3.new(X, Y, Z)
  108. if Break then
  109. p:BreakJoints()
  110. else p:MakeJoints() end
  111. p.Parent = Parent
  112. return p
  113. end
  114.  
  115. function Weld(p0, p1, x, y, z, a, b, c)
  116. local w = Instance.new("Weld")
  117. w.Parent = p0
  118. w.Part0 = p0
  119. w.Part1 = p1
  120. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(a,b,c)
  121. return w
  122. end
  123.  
  124. function ComputePos(pos1, pos2)
  125. local pos3 = Vector3.new(pos2.x, pos1.y, pos2.z)
  126. return CFrame.new(pos1, pos3)
  127. end
  128.  
  129. function getHumanoid(c)
  130. local h = nil
  131. for i,v in pairs(c:children()) do
  132. if v:IsA("Humanoid") then
  133. if v.Health > 0 then
  134. h = v
  135. end
  136. end
  137. end
  138. return h
  139. end
  140.  
  141. function molotov()
  142. local name = "Molotov"
  143. local Mod = Instance.new("Model")
  144. Mod.Name = name
  145. local main = Part(Mod, false, false, 0.4, 0, "CGA brown", 0.8, 0.2, 0.8, true)
  146. Instance.new("CylinderMesh", main).Scale = Vector3.new(1, 0.5, 1)
  147. for i = 0, 360, 45 do
  148. local p = Part(Mod, false, false, 0.4, 0, "CGA brown", 0.2, 1.2, 0.2, true)
  149. Instance.new("BlockMesh",p).Scale = Vector3.new(1, 1, 0.5)
  150. local w = Weld(main, p, 0, 0, -0.55, 0, 0, 0)
  151. w.C0 = CFrame.new(0, 0.65, 0) * CFrame.Angles(0, math.rad(i), 0)
  152. end
  153. return Mod, main, name
  154. end
  155.  
  156. function molotovhit(hit, mod)
  157. mod:remove()
  158. end
  159.  
  160. function add(modeladd, func)
  161. local Mod, Main, Naim = modeladd()
  162. table.insert(Items, {Mod, Main, func, Naim})
  163. end
  164.  
  165. add(molotov, molotovhit)
  166. Item = Items[Order]
  167.  
  168. for i,v in pairs(char:children()) do
  169. if v.Name == Modelname then
  170. v:remove()
  171. end
  172. end
  173.  
  174. torso = char.Torso
  175. neck = torso.Neck
  176. hum = char.Humanoid
  177. Rarm = char["Right Arm"]
  178. Larm = char["Left Arm"]
  179. Rleg = char["Right Leg"]
  180. Lleg = char["Left Leg"]
  181.  
  182. hc = Instance.new("Humanoid")
  183. hc.Health = 0
  184. hc.MaxHealth = 0
  185.  
  186. slash = Add.Sound(nil, "rbxasset://sounds//swordslash.wav", 0.9, 0.8)
  187. hitsound = Add.Sound(nil, "http://www.roblox.com/asset/?id=2801263", 0.7, 0.6)
  188. charge = Add.Sound(nil, "http://www.roblox.com/asset/?id=2101137", 0.8, 0.65)
  189. boom = Add.Sound(nil, "http://www.roblox.com/asset/?id=2691586", 0.8, 0.3)
  190. smashsound = Add.Sound(nil, "http://www.roblox.com/asset/?id=2692806", 0.8, 0.35)
  191. boomboom = Add.Sound(nil, "http://www.roblox.com/asset/?id=2760979", 1, 0.18)
  192.  
  193. function PlaySound(sound, pitch, vol)
  194. local s = sound:clone()
  195. if pitch ~= nil then
  196. if tonumber(pitch) then
  197. s.Pitch = tonumber(pitch)
  198. end
  199. end
  200. if vol ~= nil then
  201. if tonumber(vol) then
  202. s.Volume = tonumber(vol)
  203. end
  204. end
  205. s.Parent = torso
  206. s.PlayOnRemove = true
  207. coroutine.resume(coroutine.create(function()
  208. wait()
  209. s:remove()
  210. end))
  211. end
  212.  
  213. Mo = Instance.new("Model")
  214. Mo.Name = Modelname
  215.  
  216. RABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  217. LABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  218. RLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  219. LLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  220.  
  221. RABW = Weld(torso, RABrick, -1.5, -0.5, 0, 0, 0, 0)
  222. LABW = Weld(torso, LABrick, 1.5, -0.5, 0, 0, 0, 0)
  223. RLBW = Weld(torso, RLBrick, -0.5, 1.2, 0, 0, 0, 0)
  224. LLBW = Weld(torso, LLBrick, 0.5, 1.2, 0, 0, 0, 0)
  225.  
  226. RAW = Weld(RABrick, nil, 0, 0.5, 0, 0, 0, 0)
  227. LAW = Weld(LABrick, nil, 0, 0.5, 0, 0, 0, 0)
  228. RLW = Weld(RLBrick, nil, 0, 0.8, 0, 0, 0, 0)
  229. LLW = Weld(LLBrick, nil, 0, 0.8, 0, 0, 0, 0)
  230.  
  231. HB = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  232. HBW = Weld(Rarm, HB, 0, 1, 0, 0, 0, 0)
  233. HW = Weld(HB, nil, 0, 0.3, 0, math.pi/2, math.pi, 0)
  234.  
  235. Mo.Parent = char
  236.  
  237. function MakeBanana()
  238. local Banana = Part(workspace, false, true, 0, 0, "Bright yellow", 0.9, 0.95, 0.9, true)
  239. Banana.Friction = 0.8
  240. Banana.Elasticity = 0
  241. local mes = Add.Mesh(Banana, "http://www.roblox.com/asset/?id=28937301", 1.3, 0.8, 1.3)
  242. mes.TextureId = "http://www.roblox.com/asset/?id=28937670"
  243. HW.Part1 = Banana
  244. return Banana
  245. end
  246.  
  247. if script.Parent.className ~= "HopperBin" then
  248. h = Instance.new("HopperBin",me.Backpack)
  249. h.Name = Toolname
  250. h.TextureId = ToolIcon
  251. script.Parent = h
  252. end
  253.  
  254. bin = script.Parent
  255.  
  256. function detach(bool)
  257. LLW.C0 = CFrame.new(0, 0, 0)
  258. RLW.C0 = CFrame.new(0, 0, 0)
  259. LAW.C0 = CFrame.new(0,0,0)
  260. RAW.C0 = CFrame.new(0, 0, 0)
  261. if bool then
  262. LLW.Part1 = nil
  263. RLW.Part1 = nil
  264. RAW.Part1 = nil
  265. LAW.Part1 = nil
  266. end
  267. end
  268.  
  269. function attach()
  270. RAW.Part1 = Rarm
  271. LAW.Part1 = Larm
  272. RLW.Part1 = Rleg
  273. LLW.Part1 = Lleg
  274. end
  275.  
  276. function normal()
  277. neck.C0 = NeckStand
  278. RAW.C0 = RAWStand
  279. LAW.C0 = LAWStand
  280. RLW.C0 = RLWStand
  281. LLW.C0 = LLWStand
  282. RAW.C1 = CFrame.new(0, 0.5, 0)
  283. LAW.C1 = CFrame.new(0, 0.5, 0)
  284. RLW.C1 = CFrame.new(0, 0.8, 0)
  285. LLW.C1 = CFrame.new(0, 0.8, 0)
  286. HW.C0 = HWStand
  287. end
  288.  
  289. function Throw(mousepos)
  290. RAW.Part1 = Rarm
  291. for i = 0, 1, 0.2 do
  292. RAW.C0 = CFrame.Angles(0, 0, 0)
  293. wait()
  294. end
  295. RAW.Part1 = nil
  296. end
  297.  
  298. function select(mouse)
  299. selected = true
  300. mouse.Button1Down:connect(function()
  301. if Able then
  302. Able = false
  303. Throw(mouse.Hit.p)
  304. wait(0.5)
  305. Able = true
  306. end
  307. end)
  308. mouse.KeyDown:connect(function(key)
  309. local key = key:lower()
  310. if key == "q" then
  311. Order = Order - 1
  312. elseif key == "e" then
  313. Order = Order + 1
  314. end
  315. if Order > #Items then Order = 1 elseif Order < 1 then Order = #Items end
  316. Item = Items[Order]
  317. end)
  318. end
  319.  
  320. function deselect(mouse)
  321. selected = false
  322. end
  323.  
  324. bin.Selected:connect(select)
  325. bin.Deselected:connect(deselect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement