Gmodmoney2

Untitled

Jun 17th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.79 KB | None | 0 0
  1. --[[
  2. Drinks
  3. Models:
  4. - 0, Vodka
  5. - 1, Liquor
  6. - 2, Milk
  7. - 3, Water
  8. - 4, Coca-Cola
  9. - 5, Mountan Dew
  10. - 6, Orange Crush
  11. - 7, Pepsi
  12. - 8, Pepsi (New Logo)
  13. - 9, Sprite
  14. --]]
  15.  
  16.  
  17. if script == nil then return end
  18.  
  19.  
  20. ModelType = script:FindFirstChild("ModelType") ~= nil and loadstring("return " ..script.ModelType.Value)() or 3
  21. ModelName = (function()
  22. if ModelType == 0 then
  23. return "Vodka"
  24. elseif ModelType == 1 then
  25. return "Liquor"
  26. elseif ModelType == 2 then
  27. return "Milk"
  28. elseif ModelType == 3 then
  29. return "Water"
  30. elseif ModelType == 4 then
  31. return "Coca-Cola"
  32. elseif ModelType == 5 then
  33. return "MtnDew"
  34. elseif ModelType == 6 then
  35. return "Orange Crush"
  36. elseif ModelType == 7 then
  37. return "PEPSI"
  38. elseif ModelType == 8 then
  39. return "pepsi"
  40. elseif ModelType == 9 then
  41. return "Sprite"
  42. end
  43. end)()
  44. Player = script:FindFirstChild("Player") ~= nil and script.Player.Value or game:GetService("Players"):FindFirstChild("DarkShadow6")
  45. Selected = false
  46. Connected = false
  47. Button1Down = false
  48. CanUse = true
  49. Thrown = false
  50. FirstPerson = game:GetService("InsertService"):LoadAsset(60568552)["FirstPerson"].Value
  51. MouseAim = game:GetService("InsertService"):LoadAsset(61527949)["MouseAim"].Value
  52.  
  53.  
  54. function CheckPlayer()
  55. if Player.Character == nil then return false end
  56. if Player.Character:FindFirstChild("Torso") == nil or Player.Character:FindFirstChild("Right Arm") == nil or Player.Character:FindFirstChild("Humanoid") == nil then return false end
  57. if Player.Character.Humanoid.Health <= 0 then return false end
  58. return true
  59. end
  60.  
  61.  
  62. loadstring(game:GetService("InsertService"):LoadAsset(65363615)["tagHumanoid"].Value)()
  63.  
  64.  
  65. loadstring(game:GetService("InsertService"):LoadAsset(63178291)["CameraPunch"].Value)()
  66.  
  67.  
  68. loadstring(game:GetService("InsertService"):LoadAsset(62991657)["PacketFunctions"].Value)()
  69.  
  70.  
  71. function CreateParts(Parent, Format)
  72. if Parent == nil then return end
  73. local Parts = Instance.new("Model")
  74. Parts.Name = ModelName
  75. if Format == 1 then
  76. Parts.Name = Parts.Name.. " (Holstered)"
  77. end
  78. Parts.Parent = Parent
  79.  
  80. if ModelType <= 1 then
  81. local MasterPart = Instance.new("Part")
  82. MasterPart.Name = "Handle"
  83. MasterPart.BrickColor = BrickColor.new((function()
  84. if ModelType == 0 then
  85. return "Earth green"
  86. elseif ModelType == 1 then
  87. return "CGA brown"
  88. end
  89. end)())
  90. MasterPart.TopSurface = 0
  91. MasterPart.BottomSurface = 0
  92. MasterPart.FormFactor = "Custom"
  93. MasterPart.Size = Vector3.new(0.6, 1, 0.6)
  94. MasterPart.Parent = Parts
  95. Instance.new("CylinderMesh", MasterPart)
  96. local Weld = Instance.new("Weld")
  97. Weld.Part0 = MasterPart
  98. if Format == 1 then
  99. Weld.Part1 = Player.Character:FindFirstChild("Torso")
  100. Weld.C0 = CFrame.new(-0.75, 0.55, 0.8) * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(10))
  101. elseif Format == 2 then
  102. Weld.Part1 = Player.Character:FindFirstChild("Right Arm")
  103. Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0) * CFrame.new(0, 1.2, 0)
  104. end
  105. Weld.Parent = Weld.Part0
  106.  
  107. local Part = Instance.new("Part")
  108. Part.Name = "Label"
  109. Part.BrickColor = BrickColor.new("White")
  110. Part.TopSurface = 0
  111. Part.BottomSurface = 0
  112. Part.FormFactor = "Custom"
  113. Part.Size = Vector3.new(0.6001, 0.4, 0.6001)
  114. Part.Parent = Parts
  115. Instance.new("CylinderMesh", Part)
  116. local Weld = Instance.new("Weld")
  117. Weld.Part0 = Part
  118. Weld.Part1 = MasterPart
  119. Weld.Parent = Weld.Part0
  120.  
  121. local Part = Instance.new("Part")
  122. Part.Name = "Neck Angle"
  123. Part.BrickColor = MasterPart.BrickColor
  124. Part.TopSurface = 0
  125. Part.BottomSurface = 0
  126. Part.FormFactor = "Custom"
  127. Part.Size = Vector3.new(0.6, 0.5, 0.6)
  128. Part.Parent = Parts
  129. local Mesh = Instance.new("SpecialMesh", Part)
  130. Mesh.MeshType = "FileMesh"
  131. Mesh.MeshId = "http://www.roblox.com/Asset/?id=1033714"
  132. Mesh.Scale = Part.Size * Vector3.new(0.5, 1.335, 0.5)
  133. local Weld = Instance.new("Weld")
  134. Weld.Part0 = Part
  135. Weld.Part1 = MasterPart
  136. Weld.C0 = CFrame.new(0, -0.75, 0)
  137. Weld.Parent = Weld.Part0
  138.  
  139. local Part = Instance.new("Part")
  140. Part.Name = "Neck"
  141. Part.BrickColor = MasterPart.BrickColor
  142. Part.TopSurface = 0
  143. Part.BottomSurface = 0
  144. Part.FormFactor = "Custom"
  145. Part.Size = Vector3.new(0.25, 0.5, 0.25)
  146. Part.Parent = Parts
  147. Instance.new("CylinderMesh", Part)
  148. local Weld = Instance.new("Weld")
  149. Weld.Part0 = Part
  150. Weld.Part1 = MasterPart
  151. Weld.C0 = CFrame.new(0, -1, 0)
  152. Weld.Parent = Weld.Part0
  153.  
  154. local Part = Instance.new("Part")
  155. Part.Name = "Cap"
  156. Part.BrickColor = BrickColor.new("Black")
  157. Part.TopSurface = 0
  158. Part.BottomSurface = 0
  159. Part.FormFactor = "Custom"
  160. Part.Size = Vector3.new(0.275, 0.2, 0.275)
  161. Part.Parent = Parts
  162. local Mesh = Instance.new("CylinderMesh", Part)
  163. local Weld = Instance.new("Weld")
  164. Weld.Part0 = Part
  165. Weld.Part1 = MasterPart
  166. Weld.C0 = CFrame.new(0, -1.35, 0)
  167. Weld.Parent = Weld.Part0
  168. elseif ModelType <= 3 then
  169. local MasterPart = Instance.new("Part")
  170. MasterPart.Name = "Handle"
  171. MasterPart.FormFactor = "Custom"
  172. MasterPart.Size = Vector3.new(1, 1, 1)
  173. MasterPart.BrickColor = BrickColor.new("Institutional white")
  174. MasterPart.TopSurface = 0
  175. MasterPart.BottomSurface = 0
  176. MasterPart.Parent = Parts
  177. Instance.new("CylinderMesh", MasterPart).Scale = Vector3.new(0.8, 1.1, 0.8)
  178. local Weld = Instance.new("Weld")
  179. Weld.Part0 = MasterPart
  180. if Format == 1 then
  181. Weld.Part1 = Player.Character:FindFirstChild("Torso")
  182. Weld.C0 = CFrame.new(-0.75, 0.55, 0.8) * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(10))
  183. elseif Format == 2 then
  184. Weld.Part1 = Player.Character:FindFirstChild("Right Arm")
  185. Weld.C0 = CFrame.new(0, 0, 1.2) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  186. end
  187. Weld.Parent = Weld.Part0
  188. if ModelType == 3 then Instance.new("Decal", MasterPart).Texture = "http://www.roblox.com/Asset/?id=34403946" end
  189.  
  190. local Part = Instance.new("Part")
  191. Part.Name = "Top"
  192. Part.FormFactor = "Custom"
  193. Part.Size = Vector3.new(1, 1, 1)
  194. Part.BrickColor = BrickColor.new("Institutional white")
  195. Part.Locked = true
  196. Part.TopSurface = 0
  197. Part.BottomSurface = 0
  198. Part.Parent = Parts
  199. local Mesh = Instance.new("SpecialMesh", Part)
  200. Mesh.MeshType = "Sphere"
  201. Mesh.Scale = Vector3.new(0.8, 1, 0.8)
  202. local Weld = Instance.new("Weld")
  203. Weld.Part0 = Part
  204. Weld.Part1 = MasterPart
  205. Weld.C0 = CFrame.new(0, -0.5, 0)
  206. Weld.Parent = Part
  207.  
  208. local Part = Instance.new("Part")
  209. Part.Name = "Neck"
  210. Part.FormFactor = "Custom"
  211. Part.Size = Vector3.new(1, 1, 1)
  212. Part.BrickColor = BrickColor.new("Institutional white")
  213. Part.TopSurface = 0
  214. Part.BottomSurface = 0
  215. Part.Parent = Parts
  216. Instance.new("CylinderMesh", Part).Scale = Vector3.new(0.275, 0.25, 0.275)
  217. local Weld = Instance.new("Weld")
  218. Weld.Part0 = Part
  219. Weld.Part1 = MasterPart
  220. Weld.C0 = CFrame.new(0, -1.05, 0)
  221. Weld.Parent = Part
  222.  
  223. local Part = Instance.new("Part")
  224. Part.Name = "Rim"
  225. Part.FormFactor = "Custom"
  226. Part.Size = Vector3.new(1, 1, 1)
  227. Part.BrickColor = BrickColor.new("Institutional white")
  228. Part.TopSurface = 0
  229. Part.BottomSurface = 0
  230. Part.Parent = Parts
  231. local Mesh = Instance.new("CylinderMesh", Part)
  232. Mesh.Scale = Vector3.new(0.35, 0.05, 0.35)
  233. local Weld = Instance.new("Weld")
  234. Weld.Part0 = Part
  235. Weld.Part1 = MasterPart
  236. Weld.C0 = CFrame.new(0, -1.05, 0)
  237. Weld.Parent = Part
  238.  
  239. local Part = Instance.new("Part")
  240. Part.Name = "Cap"
  241. Part.FormFactor = "Custom"
  242. Part.Size = Vector3.new(1, 1, 1)
  243. Part.BrickColor = BrickColor.new(ModelType == 2 and "Dark stone grey" or "Bright blue")
  244. Part.TopSurface = 0
  245. Part.BottomSurface = 0
  246. Part.Parent = Parts
  247. local Mesh = Instance.new("CylinderMesh", Part)
  248. Mesh.Scale = Vector3.new(0.3, 0.2, 0.3)
  249. local Weld = Instance.new("Weld")
  250. Weld.Part0 = Part
  251. Weld.Part1 = MasterPart
  252. Weld.C0 = CFrame.new(0, -1.15, 0)
  253. Weld.Parent = Part
  254. else
  255. local MasterPart = Instance.new("Part")
  256. MasterPart.Name = "Handle"
  257. MasterPart.FormFactor = "Custom"
  258. MasterPart.Size = Vector3.new(1, 1, 1)
  259. MasterPart.BrickColor = BrickColor.new((function()
  260. if ModelType == 4 then
  261. return "Really red"
  262. elseif ModelType == 5 then
  263. return "Dark green"
  264. elseif ModelType == 6 then
  265. return "Neon orange"
  266. elseif ModelType == 7 or ModelType == 8 then
  267. return "Medium stone grey"
  268. elseif ModelType == 9 then
  269. return "Really blue"
  270. end
  271. end)())
  272. MasterPart.Reflectance = 0.2
  273. MasterPart.Locked = true
  274. MasterPart.TopSurface = 0
  275. MasterPart.BottomSurface = 0
  276. MasterPart.Parent = Parts
  277. Instance.new("CylinderMesh", MasterPart).Scale = Vector3.new(0.8, 1.1, 0.8)
  278. Instance.new("Decal", MasterPart).Texture = (function()
  279. if ModelType == 4 then
  280. return "http://www.roblox.com/Asset/?id=34592623"
  281. elseif ModelType == 5 then
  282. return "http://www.roblox.com/Asset/?id=34395075"
  283. elseif ModelType == 6 then
  284. return "http://www.roblox.com/Asset/?id=35501125"
  285. elseif ModelType == 7 then
  286. return "http://www.roblox.com/Asset/?id=34399263"
  287. elseif ModelType == 8 then
  288. return "http://www.roblox.com/Asset/?id=62696794"
  289. elseif ModelType == 9 then
  290. return "http://www.roblox.com/Asset/?id=34402643"
  291. end
  292. end)()
  293. local Weld = Instance.new("Weld")
  294. Weld.Part0 = MasterPart
  295. if Format == 1 then
  296. Weld.Part1 = Player.Character:FindFirstChild("Torso")
  297. Weld.C0 = CFrame.new(-0.75, 0.55, 0.8) * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(10))
  298. elseif Format == 2 then
  299. Weld.Part1 = Player.Character:FindFirstChild("Right Arm")
  300. Weld.C0 = CFrame.new(0, 0, 1.2) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  301. end
  302. Weld.Parent = Weld.Part0
  303. end
  304.  
  305. pcall(function()
  306. if Format == 2 and script.Open.Value == true then
  307. Parts.Cap.Transparency = 1
  308. end
  309. end)
  310.  
  311. for _, Part in pairs(Parts:GetChildren()) do
  312. Part.Locked = true
  313. Part.CanCollide = false
  314. end
  315. end
  316.  
  317.  
  318. function RemoveParts(Parent, Format)
  319. if Format == 1 then
  320. pcall(function() Parent[ModelName.. " (Holstered)"]:Remove() end)
  321. elseif Format == 2 then
  322. pcall(function() Parent[ModelName]:Remove() end)
  323. end
  324. end
  325.  
  326.  
  327. function SetAngle(Joint, Angle, Character)
  328. if Character == nil then return false end
  329. local Joints = {
  330. Character.Torso:FindFirstChild("Right Shoulder 2"),
  331. Character.Torso:FindFirstChild("Left Shoulder 2"),
  332. Character.Torso:FindFirstChild("Right Hip 2"),
  333. Character.Torso:FindFirstChild("Left Hip 2")
  334. }
  335. if Joints[Joint] == nil then return false end
  336. if Joint == 1 or Joint == 3 then
  337. Joints[Joint].DesiredAngle = Angle
  338. end
  339. if Joint == 2 or Joint == 4 then
  340. Joints[Joint].DesiredAngle = -Angle
  341. end
  342. end
  343.  
  344.  
  345. function ForceAngle(Joint, Angle, Character)
  346. if Character == nil then return false end
  347. local Joints = {
  348. Character.Torso:FindFirstChild("Right Shoulder 2"),
  349. Character.Torso:FindFirstChild("Left Shoulder 2"),
  350. Character.Torso:FindFirstChild("Right Hip 2"),
  351. Character.Torso:FindFirstChild("Left Hip 2")
  352. }
  353. if Joints[Joint] == nil then return false end
  354. if Joint == 1 or Joint == 3 then
  355. Joints[Joint].DesiredAngle = Angle
  356. Joints[Joint].CurrentAngle = Angle
  357. end
  358. if Joint == 2 or Joint == 4 then
  359. Joints[Joint].DesiredAngle = -Angle
  360. Joints[Joint].CurrentAngle = -Angle
  361. end
  362. end
  363.  
  364.  
  365. function SetSpeed(Joint, Speed, Character)
  366. if Character == nil then return false end
  367. local Joints = {
  368. Character.Torso:FindFirstChild("Right Shoulder 2"),
  369. Character.Torso:FindFirstChild("Left Shoulder 2"),
  370. Character.Torso:FindFirstChild("Right Hip 2"),
  371. Character.Torso:FindFirstChild("Left Hip 2")
  372. }
  373. if Joints[Joint] == nil then return false end
  374. Joints[Joint].MaxVelocity = Speed
  375. end
  376.  
  377.  
  378. function DisableLimb(Limb, Character)
  379. if Character == nil then return false end
  380. if Character:FindFirstChild("Torso") == nil then return false end
  381. local Joints = {
  382. Character.Torso:FindFirstChild("Right Shoulder"),
  383. Character.Torso:FindFirstChild("Left Shoulder"),
  384. Character.Torso:FindFirstChild("Right Hip"),
  385. Character.Torso:FindFirstChild("Left Hip")
  386. }
  387. local Limbs = {
  388. Character:FindFirstChild("Right Arm"),
  389. Character:FindFirstChild("Left Arm"),
  390. Character:FindFirstChild("Right Leg"),
  391. Character:FindFirstChild("Left Leg")
  392. }
  393. if Joints[Limb] == nil then return false end
  394. if Limbs[Limb] == nil then return false end
  395. local Joint = Instance.new("Motor6D")
  396. Joint.Parent = Character.Torso
  397. Joint.Part0 = Character.Torso
  398. Joint.Part1 = Limbs[Limb]
  399. if Limb == 1 then
  400. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  401. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  402. Joint.Name = "Right Shoulder 2"
  403. elseif Limb == 2 then
  404. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  405. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  406. Joint.Name = "Left Shoulder 2"
  407. elseif Limb == 3 then
  408. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  409. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  410. Joint.Name = "Right Hip 2"
  411. elseif Limb == 4 then
  412. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  413. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  414. Joint.Name = "Left Hip 2"
  415. end
  416. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  417. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  418. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  419. Joints[Limb]:Remove()
  420. end
  421.  
  422.  
  423. function ResetLimbCFrame(Limb, Character)
  424. if Character == nil then return false end
  425. if Character.Parent == nil then return false end
  426. if Character:FindFirstChild("Torso") == nil then return false end
  427. local Joints = {
  428. Character.Torso:FindFirstChild("Right Shoulder 2"),
  429. Character.Torso:FindFirstChild("Left Shoulder 2"),
  430. Character.Torso:FindFirstChild("Right Hip 2"),
  431. Character.Torso:FindFirstChild("Left Hip 2")
  432. }
  433. local Limbs = {
  434. Character:FindFirstChild("Right Arm"),
  435. Character:FindFirstChild("Left Arm"),
  436. Character:FindFirstChild("Right Leg"),
  437. Character:FindFirstChild("Left Leg")
  438. }
  439. if Joints[Limb] == nil then return false end
  440. if Limbs[Limb] == nil then return false end
  441. if Limb == 1 then
  442. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  443. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  444. elseif Limb == 2 then
  445. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  446. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  447. elseif Limb == 3 then
  448. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  449. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  450. elseif Limb == 4 then
  451. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  452. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  453. end
  454. end
  455.  
  456.  
  457. function EnableLimb(Limb, Character)
  458. if Character == nil then return false end
  459. if Character:FindFirstChild("Torso") == nil then return false end
  460. local Joints = {
  461. Character.Torso:FindFirstChild("Right Shoulder 2"),
  462. Character.Torso:FindFirstChild("Left Shoulder 2"),
  463. Character.Torso:FindFirstChild("Right Hip 2"),
  464. Character.Torso:FindFirstChild("Left Hip 2")
  465. }
  466. local Limbs = {
  467. Character:FindFirstChild("Right Arm"),
  468. Character:FindFirstChild("Left Arm"),
  469. Character:FindFirstChild("Right Leg"),
  470. Character:FindFirstChild("Left Leg")
  471. }
  472. if Joints[Limb] == nil then return false end
  473. if Limbs[Limb] == nil then return false end
  474. if Limb == 1 then
  475. Joints[Limb].Name = "Right Shoulder"
  476. elseif Limb == 2 then
  477. Joints[Limb].Name = "Left Shoulder"
  478. elseif Limb == 3 then
  479. Joints[Limb].Name = "Right Hip"
  480. elseif Limb == 4 then
  481. Joints[Limb].Name = "Left Hip"
  482. end
  483. Animate = Character:FindFirstChild("Animate")
  484. if Animate == nil then return false end
  485. Animate = Animate:Clone()
  486. Character.Animate:Remove()
  487. Animate.Parent = Character
  488. end
  489.  
  490.  
  491. function onButton1Down(Mouse)
  492. if Button1Down == true then return end
  493. Button1Down = true
  494. if CheckPlayer() == false or CanUse == false then return end
  495. CanUse = false
  496. if script.Open.Value == false then
  497. pcall(function() Player.Character[ModelName].Cap.Transparency = 1 end)
  498. SoundToServer("Cap", ModelType <= 3 and "http://www.roblox.com/Asset/?id=2697295" or "http://www.roblox.com/Asset/?id=10721950", 1, 0.5, false, Player.Character:FindFirstChild("Torso"))
  499. wait(0.5)
  500. script.Open.Value = true
  501. elseif script.Full.Value > 0 then
  502. if ModelType <= 3 then
  503. for i = 0, 10, 1 do
  504. pcall(function()
  505. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - i / 50, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(100 + i * 2), 0)
  506. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  507. end)
  508. wait()
  509. end
  510. for i = 0, 10, 1 do
  511. pcall(function()
  512. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.25, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(120 - i * 2), 0)
  513. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-i * 4), math.rad(90 - i * 6), 0)
  514. Player.Character[ModelName].Handle.Weld.C1 = CFrame.new(i / 75, -i / 20, i / 10) * CFrame.fromEulerAnglesXYZ(math.rad(i * 3), 0, 0)
  515. end)
  516. wait()
  517. end
  518. else
  519. for i = 0, 10, 1 do
  520. pcall(function()
  521. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - i / 50, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(100 + i * 3.5), 0)
  522. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-3), math.rad(90), 0)
  523. end)
  524. wait()
  525. end
  526. for i = 0, 10, 1 do
  527. pcall(function()
  528. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.25, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(i * 2), math.rad(135), 0)
  529. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-3), math.rad(90), 0)
  530. end)
  531. wait()
  532. end
  533. end
  534. while Button1Down == true and Selected == true and script.Full.Value > 0 do
  535. SendToServer([[for _, Part in pairs(Source:GetChildren()) do
  536. if Part.ClassName == "Sound" and Part.Name == "Drink" then
  537. coroutine.wrap(function()
  538. Part:Stop()
  539. Part.Volume = 0
  540. wait(0.5)
  541. Part:Remove()
  542. end)()
  543. end
  544. end]], "SoundStop", {"Source", Player.Character:FindFirstChild("Torso")})
  545. SoundToServer("Drink", "http://www.roblox.com/Asset/?id=10722059", 1, 1, false, Player.Character:FindFirstChild("Torso"))
  546. pcall(function() Player.Character.Humanoid.Health = Player.Character.Humanoid.Health + (function()
  547. if ModelType == 0 then
  548. return math.random(1, 5)
  549. elseif ModelType == 1 then
  550. return math.random(2, 6)
  551. elseif ModelType == 2 then
  552. return math.random(8, 11)
  553. elseif ModelType == 3 then
  554. return math.random(6, 12)
  555. else
  556. return math.random(1, 3)
  557. end
  558. end)() end)
  559. script.Full.Value = script.Full.Value - math.random(3, 7)
  560. if script.Full.Value < 0 then script.Full.Value = 0 end
  561. script.Parent.Name = script.Full.Value.. "%"
  562. wait(1)
  563. end
  564. script.Parent.Name = ModelName
  565. if ModelType <= 3 then
  566. for i = 10, 0, -1 do
  567. pcall(function()
  568. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.25, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(120 - i * 2), 0)
  569. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-i * 4), math.rad(90 - i * 6), 0)
  570. Player.Character[ModelName].Handle.Weld.C1 = CFrame.new(i / 75, -i / 20, i / 10) * CFrame.fromEulerAnglesXYZ(math.rad(i * 3), 0, 0)
  571. end)
  572. wait()
  573. end
  574. for i = 10, 0, -1 do
  575. pcall(function()
  576. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - i / 50, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(100 + i * 2), 0)
  577. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  578. end)
  579. wait()
  580. end
  581. else
  582. for i = 10, 0, -1 do
  583. pcall(function()
  584. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.25, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(i * 2), math.rad(135), 0)
  585. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-3), math.rad(90), 0)
  586. end)
  587. wait()
  588. end
  589. for i = 10, 0, -1 do
  590. pcall(function()
  591. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - i / 50, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(100 + i * 3.5), 0)
  592. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-3), math.rad(90), 0)
  593. end)
  594. wait()
  595. end
  596. end
  597. end
  598. CanUse = true
  599. end
  600.  
  601.  
  602. function onButton1Up(Mouse)
  603. Button1Down = false
  604. end
  605.  
  606.  
  607. function onKeyDown(Key, Mouse)
  608. if Selected == false then return end
  609. Key = Key:lower()
  610. if Button1Down == false and CanUse == true and CheckPlayer() == true then
  611. if Key == "q" then
  612. if Mouse.Target == nil then return end
  613. if CheckPlayer() == false then return end
  614. local NewPlayer = game:GetService("Players"):GetPlayerFromCharacter(Mouse.Target.Parent)
  615. if NewPlayer == nil then return end
  616. if NewPlayer.Character == nil then return end
  617. if NewPlayer.Character:FindFirstChild("Torso") == nil then return end
  618. if (NewPlayer.Character.Torso.Position - Player.Character.Torso.Position).magnitude > 10 then return end
  619. onDeselected(Mouse)
  620. wait()
  621. RemoveParts(Player.Character, 1)
  622. script.Parent.Parent = NewPlayer.Backpack
  623. Player = NewPlayer
  624. elseif Key == "g" then
  625. CanUse = false
  626. SoundToServer("Slash", "rbxasset://sounds/swordslash.wav", 1.9, 1, false, Player.Character.Torso)
  627. SetSpeed(1, 0.55, Player.Character)
  628. SetAngle(1, math.rad(200), Player.Character)
  629. wait(0.2)
  630. SetSpeed(1, 0.7, Player.Character)
  631. SetAngle(1, 0, Player.Character)
  632. local HasHit = false
  633. local _, HitConnection = pcall(function() return Player.Character[ModelName].Handle.Touched:connect(function(Hit)
  634. if HasHit == true or Hit:IsDescendantOf(Player.Character) then return end
  635. HasHit = true
  636. if ModelType <= 1 then
  637. SoundToServer("Bash", "http://www.roblox.com/Asset/?id=10209596", 1, 0.25, false, Player.Character[ModelName].Handle)
  638. else
  639. SoundToServer("Stab", "http://www.roblox.com/Asset/?id=10209590", math.random(900, 1100) / 1000, 1, false, Player.Character.Torso)
  640. end
  641. local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
  642. if Humanoid ~= nil then
  643. tagHumanoid(Humanoid)
  644. Humanoid:TakeDamage(math.random(5000, 25000) / 1000)
  645. wait()
  646. pcall(function() untagHumanoid(Humanoid) end)
  647. end
  648. end) end)
  649. wait(0.3)
  650. pcall(function() HitConnection:disconnect() end)
  651. SetSpeed(1, 0.2, Player.Character)
  652. SetAngle(1, math.rad(90), Player.Character)
  653. wait(0.1)
  654. CanUse = true
  655. elseif Key == "z" then
  656. CanUse = false
  657. local Speed = (script.Full.Value / 100)
  658. print(Speed)
  659. SoundToServer("Throw", "http://www.roblox.com/Asset/?id=18426149", 0.9, 1, false, Player.Character.Torso)
  660. SetSpeed(1, 0.55, Player.Character)
  661. SetAngle(1, math.rad(200), Player.Character)
  662. wait(0.2)
  663. SetSpeed(1, 0.7, Player.Character)
  664. SetAngle(1, 0, Player.Character)
  665. wait()
  666. pcall(function() Player.Character[ModelName].Handle.Weld:Remove() end)
  667. for _, Part in pairs(Player.Character[ModelName]:GetChildren()) do
  668. pcall(function() Part.CanCollide = true end)
  669. end
  670. local BodyVelocity = Instance.new("BodyVelocity")
  671. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  672. BodyVelocity.velocity = (Mouse.Hit.p - Player.Character[ModelName].Handle.Position).unit * (((1 - Speed) * 25) + 75)
  673. BodyVelocity.Parent = Player.Character[ModelName].Handle
  674. game:GetService("Debris"):AddItem(BodyVelocity, 0.25)
  675. local Find1 = math.random()
  676. local ParentObject = Instance.new("ObjectValue", Workspace)
  677. ParentObject.Name = Find1
  678. ParentObject.Value = Player.Character[ModelName].Handle
  679. local Find2 = math.random()
  680. local Clone = script:Clone()
  681. Clone.Disabled = true
  682. Clone.Name = Find2
  683. pcall(function() Clone.Player:Remove() end)
  684. pcall(function() Clone.ModelType:Remove() end)
  685. Clone.Parent = Workspace
  686. tagHumanoid(Player.Character[ModelName].Handle)
  687. wait(0.05)
  688. SendToServer([[local Value = Workspace["]] ..Find1.. [["]
  689. local Source = Value.Value
  690. Value:Remove()
  691. local Clone = Workspace["]] ..Find2.. [["]
  692. Clone.Parent = nil
  693. Clone.Disabled = false
  694. Status = 0
  695. Source.Touched:connect(function(Hit)
  696. if Status == 2 then
  697. if Hit.Parent == nil then return end
  698. local Player = game:GetService("Players"):GetPlayerFromCharacter(Hit.Parent)
  699. if Player ~= nil then
  700. local ModelType = Instance.new("StringValue", Clone)
  701. ModelType.Name = "ModelType"
  702. ModelType.Value = "]] ..ModelType.. [["
  703. local PlayerValue = Instance.new("ObjectValue", Clone)
  704. PlayerValue.Name = "Player"
  705. PlayerValue.Value = Player
  706. Clone.Parent = Workspace
  707. Source.Parent:Remove()
  708. end
  709. elseif Status == 0 then
  710. Status = 1
  711. local Sound = Instance.new("Sound", Source)
  712. Sound.SoundId = "]] ..(ModelType <= 1 and "http://www.roblox.com/Asset/?id=10209596" or "http://www.roblox.com/Asset/?id=10209590").. [["
  713. Sound.Pitch = math.random(900, 1100) / 1000
  714. Sound.Volume = 1
  715. Sound:Play()
  716. local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
  717. if Humanoid ~= nil then
  718. local creator = Source.creator:Clone()
  719. creator.Parent = Humanoid
  720. Humanoid:TakeDamage(]] ..(Speed * 25).. [[ + math.random(-5000, 5000) / 1000)
  721. wait()
  722. creator:Remove()
  723. end
  724. wait(3)
  725. Status = 2
  726. end
  727. end)
  728. wait(25)
  729. Source.Parent:Remove()]], "Throw")
  730. Player.Character[ModelName].Parent = Workspace
  731. wait(0.5)
  732. Selected = true
  733. Button1Down = false
  734. CanUse = true
  735. onDeselected(Mouse)
  736. RemoveParts(Player.Character, 1)
  737. script.Parent:Remove()
  738. end
  739. end
  740. end
  741.  
  742.  
  743. function onSelected(Mouse)
  744. if Selected == true or CanUse == false then return end
  745. CanUse = false
  746. while true do
  747. if CheckPlayer() == true then
  748. if Player.Character.Torso:FindFirstChild("Right Shoulder") ~= nil and Player.Character.Torso:FindFirstChild("Left Shoulder") ~= nil then
  749. break
  750. end
  751. end
  752. wait(0.1)
  753. end
  754. Selected = true
  755. RemoveParts(Player.Character, 1)
  756. CreateParts(Player.Character, 2)
  757. DisableLimb(1, Player.Character)
  758. SetSpeed(1, 0.15, Player.Character)
  759. SetAngle(1, math.rad(90), Player.Character)
  760. pcall(function() Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0) end)
  761. for i = 10, 0, -1 do
  762. pcall(function() Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(100 - i), 0) end)
  763. wait()
  764. end
  765. pcall(function() Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(100), 0) end)
  766. if script:FindFirstChild("Full") == nil then
  767. local Value = Instance.new("NumberValue", script)
  768. Value.Name = "Full"
  769. Value.Value = 100
  770. end
  771. if script:FindFirstChild("Open") == nil then
  772. local Value = Instance.new("BoolValue", script)
  773. Value.Name = "Open"
  774. Value.Value = false
  775. end
  776. Mouse.Icon = "rbxasset://textures\\GunCursor.png"
  777. Mouse.Button1Down:connect(function() onButton1Down(Mouse) end)
  778. Mouse.Button1Up:connect(function() onButton1Up(Mouse) end)
  779. Mouse.KeyDown:connect(function(Key) onKeyDown(Key, Mouse) end)
  780. CanUse = true
  781. end
  782.  
  783.  
  784. function onDeselected(Mouse)
  785. if Selected == false or Primed == true then return end
  786. Selected = false
  787. while CanUse == false do wait() end
  788. if Selected == true then return end
  789. CanUse = false
  790. SetSpeed(1, 0.15, Player.Character)
  791. SetAngle(1, 0, Player.Character)
  792. for i = 0, 10, 1 do
  793. pcall(function() Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(100 - i), 0) end)
  794. wait()
  795. end
  796. RemoveParts(Player.Character, 2)
  797. CreateParts(Player.Character, 1)
  798. ResetLimbCFrame(1, Player.Character)
  799. DisableLimb(1, Player.Character)
  800. EnableLimb(1, Player.Character)
  801. CanUse = true
  802. end
  803.  
  804.  
  805. if script.Parent.ClassName ~= "HopperBin" then
  806. if Player == nil then print("Error: Player not found!") return end
  807. Tool = Instance.new("HopperBin")
  808. Tool.Name = ModelName
  809. Tool.Parent = Player.Backpack
  810. script.Name = "Main"
  811. script.Parent = Tool
  812. elseif script.Parent.ClassName == "HopperBin" and Connected == false then
  813. Connected = true
  814. Player = script.Parent.Parent.Parent
  815. script.Parent.Selected:connect(onSelected)
  816. script.Parent.Deselected:connect(onDeselected)
  817. CreateParts(Player.Character, 1)
  818. coroutine.wrap(loadstring(FirstPerson))()
  819. coroutine.wrap(loadstring(MouseAim))()
  820. end
Add Comment
Please, Sign In to add comment