Advertisement
Namoo546

Untitled

Oct 31st, 2020 (edited)
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.60 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local char = player.Character
  3. while char:FindFirstChild("Humanoid") == nil do wait() end
  4. local hum = char:FindFirstChild("Humanoid")
  5. enabled3 = script.enabled3
  6. local enabled = true
  7. local equipped = true
  8. local ischarging = false
  9. local remote = script.Remote
  10. local remote2 = script.Remote2
  11. me = player
  12. local chargingcounter = false
  13. rand = script.rand
  14. --player:WaitForDataReady()
  15. mouse = player:GetMouse()
  16. power = 0
  17. powermax = 6
  18.  
  19.  
  20.  
  21.  
  22. function onKeyDown(key)
  23. key = key:lower()
  24.  
  25. if key == "z" then
  26. equipped = true
  27. if not ischarging then
  28. if mouse.Hit ~= nil then
  29. if char:FindFirstChild("OpeRoom") == nil then
  30. ischarging = true
  31. script.ChargeProjectile:FireServer()
  32. humanoid = player.Character:WaitForChild("Humanoid")
  33. animation = Instance.new("Animation")
  34. animation.Parent = player.Character
  35. animation.AnimationId = "rbxassetid://5198905880"
  36. anim = humanoid:LoadAnimation(animation)
  37. anim:Play()
  38. else
  39. script.removeRoom:FireServer()
  40. wait(2)
  41. local ad = player.PlayerGui:GetChildren()
  42.  
  43.  
  44. if player.PlayerGui:FindFirstChild("First") ~= nil then
  45. for i=1, #ad do
  46. if (ad[i].Name == "First") then
  47. ad[i]:remove()
  48. end
  49. end
  50. end
  51. d = player.PlayerGui:GetChildren()
  52. for i = 1,#d do
  53. if d[i].Name == "First1" then
  54. d[i]:remove()
  55. end
  56. end
  57. if player.PlayerGui:FindFirstChild("First2") ~= nil then
  58. for g=1, #ad do
  59. if (ad[g].Name == "First2") then
  60. ad[g]:remove()
  61. end
  62. end
  63. end
  64.  
  65. end
  66. end
  67. elseif ischarging then
  68. anim:Stop()
  69. animation:remove()
  70. ischarging = false
  71. enabled = false
  72. script.ReleaseProjectile:FireServer(mouse.Hit.p)
  73. wait(2)
  74. enabled = true
  75. end
  76. end
  77.  
  78. if key == "x" then
  79. if char:FindFirstChild("OpeRoom") ~= nil then
  80. if mouse.Target ~= nil then
  81. remote:FireServer(mouse.Target)
  82.  
  83. end
  84. end
  85. end
  86.  
  87. if key == "v" then
  88. if enabled == false then return end
  89. if chargingcounter == false then
  90.  
  91. chargingcounter = true
  92.  
  93.  
  94. humanoid= player.Character:WaitForChild("Humanoid")
  95. animation = Instance.new("Animation")
  96. animation.Parent = player.Character
  97. animation.AnimationId = "rbxassetid://379856161"
  98. anim = humanoid:LoadAnimation(animation)
  99. anim:Play()
  100.  
  101. while chargingcounter and power < powermax and wait(.5) do
  102. power = power + 1
  103. print('Charging')
  104. end
  105.  
  106.  
  107. else
  108.  
  109. script:WaitForChild("counterShockRelease"):FireServer(power)
  110. chargingcounter = false
  111. power = 0
  112. enabled = false
  113. anim:Stop()
  114. anim:Destroy()
  115.  
  116. wait(5)
  117. enabled = true
  118.  
  119. end
  120. --else
  121. --[[humanoid= player.Character:WaitForChild("Humanoid")
  122. animation = Instance.new("Animation")
  123. animation.Parent = player.Character
  124. animation.AnimationId = "rbxassetid://379856161"
  125. anim = humanoid:LoadAnimation(animation)
  126. anim:Play()
  127.  
  128. script:WaitForChild("counterShockRelease"):FireServer(power)
  129.  
  130. enabled = false
  131. wait(1)
  132.  
  133. anim:Stop()
  134.  
  135.  
  136.  
  137.  
  138. wait(5)
  139. enabled = true--]]
  140.  
  141.  
  142.  
  143. end
  144. if key == "e" then
  145. if enabled3.Value == false then return end
  146. script.heartstab:FireServer(enabled3)
  147. end
  148.  
  149.  
  150.  
  151.  
  152. if key == "c" then
  153. if char:FindFirstChild("OpeRoom") ~= nil then
  154. script.heartgrab:FireServer(enabled3, rand)
  155. end
  156.  
  157. end
  158. end
  159.  
  160. mouse.KeyDown:connect(onKeyDown)
  161. script.Parent.heartgrab.OnServerEvent:Connect(function(plr, enabled3, rand)
  162. local char = plr.Character
  163. if enabled3.Value == true then
  164. d = char:GetChildren()
  165. foundheart = false
  166. for i = 1,#d do
  167. if d[i].className == "Tool" then
  168. if d[i]:FindFirstChild("HeartTool")~= nil then
  169. foundheart = true
  170. end
  171. end
  172. end
  173.  
  174. if foundheart == true then
  175. enabled3.Value = false
  176.  
  177. humanoid2 = char:WaitForChild("Humanoid")
  178. animation2 = Instance.new("Animation")
  179. animation2.Parent = char
  180. animation2.AnimationId = "rbxassetid://379426476"
  181. anim2 = humanoid2:LoadAnimation(animation2)
  182. anim2:Play()
  183.  
  184. d = char:GetChildren()
  185. for i = 1,#d do
  186. if d[i].className == "Tool" then
  187. if d[i]:FindFirstChild("HeartTool")~= nil then
  188. gd = script.HeartPutBack:clone()
  189. gd.Parent = d[i].Handle
  190. gd.Disabled = false
  191. game.Debris:AddItem(gd,.4)
  192. end
  193. end
  194. end
  195. wait(.5)
  196. anim2:Stop()
  197. animation2:remove()
  198.  
  199.  
  200.  
  201.  
  202.  
  203. enabled3.Value = true
  204.  
  205.  
  206.  
  207. else
  208.  
  209.  
  210.  
  211.  
  212. if rand.Value == 1 then
  213. enabled3.Value = false
  214. humanoid2 = char:WaitForChild("Humanoid")
  215. animation2 = Instance.new("Animation")
  216. animation2.Parent = char
  217. animation2.AnimationId = "rbxassetid://379426476"
  218. anim2 = humanoid2:LoadAnimation(animation2)
  219. anim2:Play()
  220. gd = script.HeartGrabber:clone()
  221. gd.Parent = char["Right Arm"]
  222. gd.Disabled = false
  223. game.Debris:AddItem(gd,.2)
  224. wait(.2)
  225. anim2:Stop()
  226. animation2:remove()
  227. enabled3.Value = true
  228. rand.Value = 2
  229. else
  230. gd1= script.HeartGrabber:clone()
  231. gd1.Parent = char["Left Arm"]
  232. gd1.Disabled = false
  233. game.Debris:AddItem(gd1,.2)
  234. humanoid1 = char:WaitForChild("Humanoid")
  235. animation1 = Instance.new("Animation")
  236. animation1.Parent = char
  237. animation1.AnimationId = "rbxassetid://379426167"
  238. anim1 = humanoid1:LoadAnimation(animation1)
  239. anim1:Play()
  240. enabled3.Value = false
  241. wait(.2)
  242. anim1:Stop()
  243. animation1:remove()
  244. rand.Value =1
  245. enabled3.Value = true
  246. end
  247. end
  248. --end
  249. end
  250. end)
  251.  
  252. script.Parent.heartstab.OnServerEvent:Connect(function(plr, enabled3)
  253. local char = plr.Character
  254. if enabled3.Value == false then return end
  255. d = char:GetChildren()
  256. foundheartstab = false
  257. for i = 1,#d do
  258. if d[i].className == "Tool" then
  259. if d[i]:FindFirstChild("HeartTool")~= nil then
  260. foundheartstab = true
  261. end
  262. end
  263. end
  264.  
  265. if foundheartstab == true then
  266. enabled3.Value = false
  267.  
  268. humanoid2 = char:WaitForChild("Humanoid")
  269. animation2 = Instance.new("Animation")
  270. animation2.Parent = char
  271. animation2.AnimationId = "rbxassetid://379597161"
  272. anim2 = humanoid2:LoadAnimation(animation2)
  273. anim2:Play()
  274.  
  275. part = Instance.new("Part")
  276. part.Parent = char
  277. part.BrickColor = BrickColor.new("Dark stone grey")
  278. part.CanCollide = false
  279. part.Size = Vector3.new(1,1,1)
  280.  
  281. mesh = Instance.new("SpecialMesh")
  282. mesh.Parent = part
  283. mesh.MeshId = "rbxasset://fonts/sword.mesh"
  284. mesh.Scale = Vector3.new(.5, 1, 0.4)
  285.  
  286. w = Instance.new("Weld")
  287. w.Parent = char["Left Arm"]
  288. w.Part0 = char["Left Arm"]
  289. w.Part1 = part
  290. w.C0 = CFrame.new(0,-1.1,0)
  291. w.C1 = CFrame.Angles(0,0,0)
  292.  
  293. game.Debris:AddItem(part,1.5)
  294.  
  295. d = char:GetChildren()
  296. for i = 1,#d do
  297. if d[i].className == "Tool" then
  298. if d[i]:FindFirstChild("HeartTool")~= nil then
  299.  
  300. heart = d[i].HeartTool.Heart
  301.  
  302. if heart.Value:IsA("Humanoid") then
  303. wait(1)
  304. heart.Value:TakeDamage(1000000)
  305. end
  306.  
  307. d[i].Handle.Mesh.Scale = Vector3.new(1,.3,1)
  308. d[i].Handle.BrickColor = BrickColor.new("Bright red")
  309. d[i].HeartDecoration.HeartMesh.Scale = Vector3.new(0.4,0.1,0.4)
  310.  
  311. game.Debris:AddItem(d[i],1.5)
  312.  
  313. end
  314. end
  315. end
  316.  
  317. wait(1.5)
  318.  
  319.  
  320. anim2:Stop()
  321.  
  322. enabled3.Value = true
  323. end
  324. end)
  325.  
  326. script.Parent.counterShockRelease.OnServerEvent:Connect(function(plr, power)
  327. local char = plr.Character
  328.  
  329. part = Instance.new("Part")
  330. part.BrickColor = BrickColor.new("Dark stone grey")
  331. part.CanCollide = false
  332. part.Anchored = true
  333. part.Transparency = 1
  334. part.Size = Vector3.new(10,10,10)
  335.  
  336. creat = Instance.new("ObjectValue")
  337. creat.Parent = part
  338. creat.Name = "creator"
  339. creat.Value = plr
  340.  
  341. chargetag = Instance.new("IntValue")
  342. chargetag.Parent = part
  343. chargetag.Name = "ChargeTag"
  344. chargetag.Value = power
  345.  
  346. part.CFrame = char.Torso.CFrame*CFrame.new(0,0,-5)
  347. part.Parent = game.Workspace
  348.  
  349. sho = script.Shock:clone()
  350. sho.Parent = part
  351. sho.Disabled = false
  352.  
  353. game.Debris:AddItem(part,1)
  354.  
  355.  
  356. part1 = Instance.new("Part")
  357. part1.Parent = char
  358. part1.BrickColor = BrickColor.new("Dark stone grey")
  359. part1.CanCollide = false
  360. part1.Transparency = 1
  361. part1.Size = Vector3.new(power,power,power)
  362.  
  363. mesh = script.ShockImage:clone()
  364. mesh.Parent = part1
  365. mesh.Enabled = true
  366.  
  367. w = Instance.new("Weld")
  368. w.Parent = char["Left Arm"]
  369. w.Part0 = char["Left Arm"]
  370. w.Part1 = part1
  371. w.C0 = CFrame.new(0,-1.25,0)
  372. w.C1 = CFrame.Angles(0,0,0)
  373.  
  374. wait(1)
  375. --char.Torso.PointLight:Destroy()
  376. part1:remove()
  377. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement