Advertisement
LOl2x234

Untitled

Feb 21st, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.58 KB | None | 0 0
  1. --[[
  2. Adrenaline Syringe
  3.  
  4. Syringe filled with a high-concentration of adrenaline.
  5. Too much can cause heart palpitations.
  6. Script by DarkShadow6
  7. --]]
  8.  
  9.  
  10. if script == nil then return end
  11.  
  12.  
  13. Player = game:GetService("Players"):FindFirstChild("dramastar00")
  14. Name = "Adrenaline Syringe"
  15. selected = false
  16. Button1Down = false
  17. CanUse = true
  18.  
  19.  
  20. function makeParts(format)
  21. local model = Instance.new("Model")
  22. model.Name = Name
  23. local pm = Instance.new("Part")
  24. pm.Name = "Handle"
  25. pm.FormFactor = "Custom"
  26. pm.Size = Vector3.new(1, 1, 1)
  27. pm.BrickColor = BrickColor.new("Institutional white")
  28. pm.Locked = true
  29. pm.TopSurface = 0
  30. pm.BottomSurface = 0
  31. pm.Parent = model
  32. local m = Instance.new("CylinderMesh")
  33. m.Scale = Vector3.new(0.25, 1, 0.25)
  34. m.Parent = pm
  35. if format ~= nil then
  36. local w = Instance.new("Weld")
  37. w.Part0 = pm
  38. if format == "hand" then
  39. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  40. w.C0 = CFrame.new(0, 0.1, 1.1) * CFrame.fromEulerAnglesXYZ(math.rad(70), 0, 0)
  41. w.C1 = CFrame.new()
  42. elseif format == "holster" then
  43. w.Part1 = Player.Character:FindFirstChild("Right Leg")
  44. w.C0 = CFrame.new(-0.65, -0.25, 0) * CFrame.fromEulerAnglesXYZ(math.rad(25), 0, 0)
  45. w.C1 = CFrame.new()
  46. w.Parent = pm
  47. model.Name = Name.. " (Holstered)"
  48. end
  49. w.Parent = pm
  50. model.Parent = Player.Character
  51. end
  52. local p = Instance.new("Part")
  53. p.Name = "Syringe Valve 1"
  54. p.FormFactor = "Custom"
  55. p.Size = Vector3.new(1, 1, 1)
  56. p.BrickColor = BrickColor.new("Institutional white")
  57. p.CanCollide = false
  58. p.Locked = true
  59. p.TopSurface = 0
  60. p.BottomSurface = 0
  61. p.Parent = model
  62. local m = Instance.new("CylinderMesh")
  63. m.Scale = Vector3.new(0.15, 0.5, 0.15)
  64. m.Parent = p
  65. local w = Instance.new("Weld")
  66. w.Part0 = p
  67. w.Part1 = pm
  68. w.C0 = CFrame.new(0, -0.75, 0)
  69. w.C1 = CFrame.new()
  70. w.Parent = p
  71. local p = Instance.new("Part")
  72. p.Name = "Syringe Valve 2"
  73. p.FormFactor = "Custom"
  74. p.Size = Vector3.new(1, 1, 1)
  75. p.BrickColor = BrickColor.new("Institutional white")
  76. p.CanCollide = false
  77. p.Locked = true
  78. p.TopSurface = 0
  79. p.BottomSurface = 0
  80. p.Parent = model
  81. local m = Instance.new("CylinderMesh")
  82. m.Scale = Vector3.new(0.3, 0.01, 0.3)
  83. m.Parent = p
  84. local w = Instance.new("Weld")
  85. w.Part0 = p
  86. w.Part1 = pm
  87. w.C0 = CFrame.new(0, -1, 0)
  88. w.C1 = CFrame.new()
  89. w.Parent = p
  90. local p = Instance.new("Part")
  91. p.Name = "Syringe Tip"
  92. p.FormFactor = "Custom"
  93. p.Size = Vector3.new(1, 1, 1)
  94. p.BrickColor = BrickColor.new("Institutional white")
  95. p.CanCollide = false
  96. p.Locked = true
  97. p.TopSurface = 0
  98. p.BottomSurface = 0
  99. p.Parent = model
  100. local m = Instance.new("CylinderMesh")
  101. m.Scale = Vector3.new(0.2, 0.1, 0.2)
  102. m.Parent = p
  103. local w = Instance.new("Weld")
  104. w.Part0 = p
  105. w.Part1 = pm
  106. w.C0 = CFrame.new(0, 0.5, 0)
  107. w.C1 = CFrame.new()
  108. w.Parent = p
  109. local p = Instance.new("Part")
  110. p.Name = "Syringe Needle"
  111. p.FormFactor = "Custom"
  112. p.Size = Vector3.new(1, 1, 1)
  113. p.BrickColor = BrickColor.new("Medium stone grey")
  114. p.CanCollide = false
  115. p.Locked = true
  116. p.TopSurface = 0
  117. p.BottomSurface = 0
  118. p.Parent = model
  119. local m = Instance.new("CylinderMesh")
  120. m.Scale = Vector3.new(0.01, 1, 0.01)
  121. m.Parent = p
  122. local w = Instance.new("Weld")
  123. w.Part0 = p
  124. w.Part1 = pm
  125. w.C0 = CFrame.new(0, 1, 0)
  126. w.C1 = CFrame.new()
  127. w.Parent = p
  128. return model
  129. end
  130.  
  131.  
  132. function removeParts(format)
  133. if format == "hand" then
  134. pcall(function() Player.Character[Name]:Remove() end)
  135. elseif format == "holster" then
  136. pcall(function() Player.Character[Name.. " (Holstered)"]:Remove() end)
  137. end
  138. end
  139.  
  140.  
  141. function SetAngle(Joint, Angle, Character)
  142. if Character == nil then return false end
  143. local Joints = {
  144. Character.Torso:FindFirstChild("Right Shoulder 2"),
  145. Character.Torso:FindFirstChild("Left Shoulder 2"),
  146. Character.Torso:FindFirstChild("Right Hip 2"),
  147. Character.Torso:FindFirstChild("Left Hip 2")
  148. }
  149. if Joints[Joint] == nil then return false end
  150. if Joint == 1 or Joint == 3 then
  151. Joints[Joint].DesiredAngle = Angle
  152. end
  153. if Joint == 2 or Joint == 4 then
  154. Joints[Joint].DesiredAngle = -Angle
  155. end
  156. end
  157.  
  158.  
  159. function ForceAngle(Joint, Angle, Character)
  160. if Character == nil then return false end
  161. local Joints = {
  162. Character.Torso:FindFirstChild("Right Shoulder 2"),
  163. Character.Torso:FindFirstChild("Left Shoulder 2"),
  164. Character.Torso:FindFirstChild("Right Hip 2"),
  165. Character.Torso:FindFirstChild("Left Hip 2")
  166. }
  167. if Joints[Joint] == nil then return false end
  168. if Joint == 1 or Joint == 3 then
  169. Joints[Joint].DesiredAngle = Angle
  170. Joints[Joint].CurrentAngle = Angle
  171. end
  172. if Joint == 2 or Joint == 4 then
  173. Joints[Joint].DesiredAngle = -Angle
  174. Joints[Joint].CurrentAngle = -Angle
  175. end
  176. end
  177.  
  178.  
  179. function SetSpeed(Joint, Speed, Character)
  180. if Character == nil then return false end
  181. local Joints = {
  182. Character.Torso:FindFirstChild("Right Shoulder 2"),
  183. Character.Torso:FindFirstChild("Left Shoulder 2"),
  184. Character.Torso:FindFirstChild("Right Hip 2"),
  185. Character.Torso:FindFirstChild("Left Hip 2")
  186. }
  187. if Joints[Joint] == nil then return false end
  188. Joints[Joint].MaxVelocity = Speed
  189. end
  190.  
  191.  
  192. function DisableLimb(Limb, Character)
  193. if Character == nil then return false end
  194. if Character:FindFirstChild("Torso") == nil then return false end
  195. local Joints = {
  196. Character.Torso:FindFirstChild("Right Shoulder"),
  197. Character.Torso:FindFirstChild("Left Shoulder"),
  198. Character.Torso:FindFirstChild("Right Hip"),
  199. Character.Torso:FindFirstChild("Left Hip")
  200. }
  201. local Limbs = {
  202. Character:FindFirstChild("Right Arm"),
  203. Character:FindFirstChild("Left Arm"),
  204. Character:FindFirstChild("Right Leg"),
  205. Character:FindFirstChild("Left Leg")
  206. }
  207. if Joints[Limb] == nil then return false end
  208. if Limbs[Limb] == nil then return false end
  209. local Joint = Instance.new("Motor")
  210. Joint.Parent = Character.Torso
  211. Joint.Part0 = Character.Torso
  212. Joint.Part1 = Limbs[Limb]
  213. if Limb == 1 then
  214. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  215. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  216. Joint.Name = "Right Shoulder 2"
  217. elseif Limb == 2 then
  218. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  219. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  220. Joint.Name = "Left Shoulder 2"
  221. elseif Limb == 3 then
  222. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  223. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  224. Joint.Name = "Right Hip 2"
  225. elseif Limb == 4 then
  226. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  227. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  228. Joint.Name = "Left Hip 2"
  229. end
  230. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  231. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  232. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  233. Joints[Limb]:Remove()
  234. end
  235.  
  236.  
  237. function ResetLimbCFrame(Limb, Character)
  238. if Character == nil then return false end
  239. if Character.Parent == nil then return false end
  240. if Character:FindFirstChild("Torso") == nil then return false end
  241. local Joints = {
  242. Character.Torso:FindFirstChild("Right Shoulder 2"),
  243. Character.Torso:FindFirstChild("Left Shoulder 2"),
  244. Character.Torso:FindFirstChild("Right Hip 2"),
  245. Character.Torso:FindFirstChild("Left Hip 2")
  246. }
  247. local Limbs = {
  248. Character:FindFirstChild("Right Arm"),
  249. Character:FindFirstChild("Left Arm"),
  250. Character:FindFirstChild("Right Leg"),
  251. Character:FindFirstChild("Left Leg")
  252. }
  253. if Joints[Limb] == nil then return false end
  254. if Limbs[Limb] == nil then return false end
  255. if Limb == 1 then
  256. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  257. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  258. elseif Limb == 2 then
  259. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  260. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  261. elseif Limb == 3 then
  262. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  263. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  264. elseif Limb == 4 then
  265. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  266. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  267. end
  268. end
  269.  
  270.  
  271. function EnableLimb(Limb, Character)
  272. if Character == nil then return false end
  273. if Character:FindFirstChild("Torso") == nil then return false end
  274. local Joints = {
  275. Character.Torso:FindFirstChild("Right Shoulder 2"),
  276. Character.Torso:FindFirstChild("Left Shoulder 2"),
  277. Character.Torso:FindFirstChild("Right Hip 2"),
  278. Character.Torso:FindFirstChild("Left Hip 2")
  279. }
  280. local Limbs = {
  281. Character:FindFirstChild("Right Arm"),
  282. Character:FindFirstChild("Left Arm"),
  283. Character:FindFirstChild("Right Leg"),
  284. Character:FindFirstChild("Left Leg")
  285. }
  286. if Joints[Limb] == nil then return false end
  287. if Limbs[Limb] == nil then return false end
  288. if Limb == 1 then
  289. Joints[Limb].Name = "Right Shoulder"
  290. elseif Limb == 2 then
  291. Joints[Limb].Name = "Left Shoulder"
  292. elseif Limb == 3 then
  293. Joints[Limb].Name = "Right Hip"
  294. elseif Limb == 4 then
  295. Joints[Limb].Name = "Left Hip"
  296. end
  297. Animate = Character:FindFirstChild("Animate")
  298. if Animate == nil then return false end
  299. Animate = Animate:Clone()
  300. Character.Animate:Remove()
  301. Animate.Parent = Character
  302. end
  303.  
  304.  
  305. function onButton1Down(mouse)
  306. if selected == false or CanUse == false then return end
  307. if Player.Character:FindFirstChild(Name) ~= nil then
  308. local Model = nil
  309. if mouse.Target ~= nil then
  310. if mouse.Target.Parent:FindFirstChild("Humanoid") ~= nil and mouse.Target.Parent:FindFirstChild("Torso") ~= nil then
  311. Model = mouse.Target.Parent
  312. if (Model.Torso.Position - Player.Character[Name]["Syringe Needle"].Position).magnitude > 3 then return end
  313. end
  314. end
  315. if Model == nil then
  316. if Player.Character:FindFirstChild("Humanoid") ~= nil and Player.Character:FindFirstChild("Torso") ~= nil then
  317. Model = Player.Character
  318. end
  319. end
  320. if Model == nil then return end
  321. if Model.Humanoid.MaxHealth > (100 * 10) * math.random(2, 5) * 10 then
  322. Model.Humanoid.Health = 0
  323. return
  324. end
  325. CanUse = false
  326. Model.Humanoid.MaxHealth = Model.Humanoid.MaxHealth * 10
  327. coroutine.wrap(function() wait(0.25) Model.Humanoid.Health = Model.Humanoid.Health * 10 end)()
  328. coroutine.wrap(function()
  329. local Max = math.random(750, 1000)
  330. local WalkSpeed = Model.Humanoid.WalkSpeed * 2
  331. for i = Max, 0, -1 do
  332. Model.Humanoid.WalkSpeed = WalkSpeed * (i / Max) + 16
  333. wait()
  334. end
  335. wait(1)
  336. Model.Humanoid.WalkSpeed = WalkSpeed / 2
  337. Model.Humanoid.MaxHealth = Model.Humanoid.MaxHealth / 10
  338. Model.Humanoid.Health = Model.Humanoid.Health / 10
  339. end)()
  340. if Model == Player.Character then
  341. SetSpeed(1, 0.1, Model)
  342. for i = 90, 0, -10 do
  343. SetAngle(1, math.rad(5), Model)
  344. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(i), 0)
  345. wait()
  346. end
  347. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0)
  348. end
  349. coroutine.wrap(function()
  350. for i = 0, 1, 0.1 do
  351. Player.Character[Name]["Syringe Valve 1"].Weld.C0 = CFrame.new(0, -0.75 + (0.5 * i), 0)
  352. Player.Character[Name]["Syringe Valve 2"].Weld.C0 = CFrame.new(0, -1 + (0.5 * i), 0)
  353. wait()
  354. end
  355. wait(0.25)
  356. for i = 1, 0, -0.05 do
  357. Player.Character[Name]["Syringe Valve 1"].Weld.C0 = CFrame.new(0, -0.75 + (0.5 * i), 0)
  358. Player.Character[Name]["Syringe Valve 2"].Weld.C0 = CFrame.new(0, -1 + (0.5 * i), 0)
  359. wait()
  360. end
  361. end)()
  362. if Model == Player.Character then
  363. wait(0.75)
  364. SetSpeed(1, 0.1, Model)
  365. for i = 0, 90, 15 do
  366. SetAngle(1, math.rad(90), Model)
  367. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(i), 0)
  368. wait()
  369. end
  370. ResetLimbCFrame(1, Model)
  371. end
  372. CanUse = true
  373. end
  374. end
  375.  
  376.  
  377. function onKeyDown(key, mouse)
  378. if selected == false then return end
  379. key = key:lower()
  380. if key == "q" and CanUse == true then
  381. if mouse.Target == nil then return end
  382. if game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent) ~= nil then
  383. onDeselected(mouse)
  384. removeParts("holster")
  385. script.Parent.Parent = game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent).Backpack
  386. end
  387. end
  388. end
  389.  
  390.  
  391. function onSelected(mouse)
  392. if selected == true then return end
  393. selected = true
  394. mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  395. while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
  396. if Player.Character.WeaponActivated.Value == nil then break end
  397. if Player.Character.WeaponActivated.Value.Parent == nil then break end
  398. wait()
  399. end
  400. local weapon = Instance.new("ObjectValue")
  401. weapon.Name = "WeaponActivated"
  402. weapon.Value = script.Parent
  403. weapon.Parent = Player.Character
  404. DisableLimb(1, Player.Character)
  405. SetAngle(1, math.rad(90), Player.Character)
  406. removeParts("holster")
  407. makeParts("hand")
  408. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  409. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  410. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  411. end
  412.  
  413.  
  414. function onDeselected(mouse)
  415. if selected == false then return end
  416. Button1Down = false
  417. while canFire == false do
  418. wait()
  419. end
  420. selected = false
  421. removeParts("hand")
  422. makeParts("holster")
  423. ForceAngle(1, 0, Player.Character)
  424. EnableLimb(1, Player.Character)
  425. if Player.PlayerGui:FindFirstChild(Name) ~= nil then Player.PlayerGui[Name]:Remove() end
  426. if Player.Character:FindFirstChild("WeaponActivated") ~= nil then
  427. if Player.Character.WeaponActivated.Value == script.Parent then
  428. Player.Character.WeaponActivated:Remove()
  429. end
  430. end
  431. while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
  432. if Player.Character.WeaponActivated.Value == nil then break end
  433. if Player.Character.WeaponActivated.Value.Parent == nil then break end
  434. wait()
  435. end
  436. end
  437.  
  438.  
  439. if script.Parent.ClassName ~= "HopperBin" then
  440. if Player == nil then print("Error: Player not found!") return end
  441. Tool = Instance.new("HopperBin")
  442. Tool.Name = Name
  443. Tool.Parent = Player.Backpack
  444. script.Name = "Main"
  445. script.Parent = Tool
  446. elseif script.Parent.ClassName == "HopperBin" then
  447. while script.Parent.Parent.ClassName ~= "Backpack" do
  448. wait()
  449. end
  450. Player = script.Parent.Parent.Parent
  451. makeParts("holster")
  452. script.Parent.Selected:connect(onSelected)
  453. script.Parent.Deselected:connect(onDeselected)
  454. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement