Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local char = player.Character
- while char:FindFirstChild("Humanoid") == nil do wait() end
- local hum = char:FindFirstChild("Humanoid")
- enabled3 = script.enabled3
- local enabled = true
- local equipped = true
- local ischarging = false
- local remote = script.Remote
- local remote2 = script.Remote2
- me = player
- local chargingcounter = false
- rand = script.rand
- --player:WaitForDataReady()
- mouse = player:GetMouse()
- power = 0
- powermax = 6
- function onKeyDown(key)
- key = key:lower()
- if key == "z" then
- equipped = true
- if not ischarging then
- if mouse.Hit ~= nil then
- if char:FindFirstChild("OpeRoom") == nil then
- ischarging = true
- script.ChargeProjectile:FireServer()
- humanoid = player.Character:WaitForChild("Humanoid")
- animation = Instance.new("Animation")
- animation.Parent = player.Character
- animation.AnimationId = "rbxassetid://5198905880"
- anim = humanoid:LoadAnimation(animation)
- anim:Play()
- else
- script.removeRoom:FireServer()
- wait(2)
- local ad = player.PlayerGui:GetChildren()
- if player.PlayerGui:FindFirstChild("First") ~= nil then
- for i=1, #ad do
- if (ad[i].Name == "First") then
- ad[i]:remove()
- end
- end
- end
- d = player.PlayerGui:GetChildren()
- for i = 1,#d do
- if d[i].Name == "First1" then
- d[i]:remove()
- end
- end
- if player.PlayerGui:FindFirstChild("First2") ~= nil then
- for g=1, #ad do
- if (ad[g].Name == "First2") then
- ad[g]:remove()
- end
- end
- end
- end
- end
- elseif ischarging then
- anim:Stop()
- animation:remove()
- ischarging = false
- enabled = false
- script.ReleaseProjectile:FireServer(mouse.Hit.p)
- wait(2)
- enabled = true
- end
- end
- if key == "x" then
- if char:FindFirstChild("OpeRoom") ~= nil then
- if mouse.Target ~= nil then
- remote:FireServer(mouse.Target)
- end
- end
- end
- if key == "v" then
- if enabled == false then return end
- if chargingcounter == false then
- chargingcounter = true
- humanoid= player.Character:WaitForChild("Humanoid")
- animation = Instance.new("Animation")
- animation.Parent = player.Character
- animation.AnimationId = "rbxassetid://379856161"
- anim = humanoid:LoadAnimation(animation)
- anim:Play()
- while chargingcounter and power < powermax and wait(.5) do
- power = power + 1
- print('Charging')
- end
- else
- script:WaitForChild("counterShockRelease"):FireServer(power)
- chargingcounter = false
- power = 0
- enabled = false
- anim:Stop()
- anim:Destroy()
- wait(5)
- enabled = true
- end
- --else
- --[[humanoid= player.Character:WaitForChild("Humanoid")
- animation = Instance.new("Animation")
- animation.Parent = player.Character
- animation.AnimationId = "rbxassetid://379856161"
- anim = humanoid:LoadAnimation(animation)
- anim:Play()
- script:WaitForChild("counterShockRelease"):FireServer(power)
- enabled = false
- wait(1)
- anim:Stop()
- wait(5)
- enabled = true--]]
- end
- if key == "e" then
- if enabled3.Value == false then return end
- script.heartstab:FireServer(enabled3)
- end
- if key == "c" then
- if char:FindFirstChild("OpeRoom") ~= nil then
- script.heartgrab:FireServer(enabled3, rand)
- end
- end
- end
- mouse.KeyDown:connect(onKeyDown)
- script.Parent.heartgrab.OnServerEvent:Connect(function(plr, enabled3, rand)
- local char = plr.Character
- if enabled3.Value == true then
- d = char:GetChildren()
- foundheart = false
- for i = 1,#d do
- if d[i].className == "Tool" then
- if d[i]:FindFirstChild("HeartTool")~= nil then
- foundheart = true
- end
- end
- end
- if foundheart == true then
- enabled3.Value = false
- humanoid2 = char:WaitForChild("Humanoid")
- animation2 = Instance.new("Animation")
- animation2.Parent = char
- animation2.AnimationId = "rbxassetid://379426476"
- anim2 = humanoid2:LoadAnimation(animation2)
- anim2:Play()
- d = char:GetChildren()
- for i = 1,#d do
- if d[i].className == "Tool" then
- if d[i]:FindFirstChild("HeartTool")~= nil then
- gd = script.HeartPutBack:clone()
- gd.Parent = d[i].Handle
- gd.Disabled = false
- game.Debris:AddItem(gd,.4)
- end
- end
- end
- wait(.5)
- anim2:Stop()
- animation2:remove()
- enabled3.Value = true
- else
- if rand.Value == 1 then
- enabled3.Value = false
- humanoid2 = char:WaitForChild("Humanoid")
- animation2 = Instance.new("Animation")
- animation2.Parent = char
- animation2.AnimationId = "rbxassetid://379426476"
- anim2 = humanoid2:LoadAnimation(animation2)
- anim2:Play()
- gd = script.HeartGrabber:clone()
- gd.Parent = char["Right Arm"]
- gd.Disabled = false
- game.Debris:AddItem(gd,.2)
- wait(.2)
- anim2:Stop()
- animation2:remove()
- enabled3.Value = true
- rand.Value = 2
- else
- gd1= script.HeartGrabber:clone()
- gd1.Parent = char["Left Arm"]
- gd1.Disabled = false
- game.Debris:AddItem(gd1,.2)
- humanoid1 = char:WaitForChild("Humanoid")
- animation1 = Instance.new("Animation")
- animation1.Parent = char
- animation1.AnimationId = "rbxassetid://379426167"
- anim1 = humanoid1:LoadAnimation(animation1)
- anim1:Play()
- enabled3.Value = false
- wait(.2)
- anim1:Stop()
- animation1:remove()
- rand.Value =1
- enabled3.Value = true
- end
- end
- --end
- end
- end)
- script.Parent.heartstab.OnServerEvent:Connect(function(plr, enabled3)
- local char = plr.Character
- if enabled3.Value == false then return end
- d = char:GetChildren()
- foundheartstab = false
- for i = 1,#d do
- if d[i].className == "Tool" then
- if d[i]:FindFirstChild("HeartTool")~= nil then
- foundheartstab = true
- end
- end
- end
- if foundheartstab == true then
- enabled3.Value = false
- humanoid2 = char:WaitForChild("Humanoid")
- animation2 = Instance.new("Animation")
- animation2.Parent = char
- animation2.AnimationId = "rbxassetid://379597161"
- anim2 = humanoid2:LoadAnimation(animation2)
- anim2:Play()
- part = Instance.new("Part")
- part.Parent = char
- part.BrickColor = BrickColor.new("Dark stone grey")
- part.CanCollide = false
- part.Size = Vector3.new(1,1,1)
- mesh = Instance.new("SpecialMesh")
- mesh.Parent = part
- mesh.MeshId = "rbxasset://fonts/sword.mesh"
- mesh.Scale = Vector3.new(.5, 1, 0.4)
- w = Instance.new("Weld")
- w.Parent = char["Left Arm"]
- w.Part0 = char["Left Arm"]
- w.Part1 = part
- w.C0 = CFrame.new(0,-1.1,0)
- w.C1 = CFrame.Angles(0,0,0)
- game.Debris:AddItem(part,1.5)
- d = char:GetChildren()
- for i = 1,#d do
- if d[i].className == "Tool" then
- if d[i]:FindFirstChild("HeartTool")~= nil then
- heart = d[i].HeartTool.Heart
- if heart.Value:IsA("Humanoid") then
- wait(1)
- heart.Value:TakeDamage(1000000)
- end
- d[i].Handle.Mesh.Scale = Vector3.new(1,.3,1)
- d[i].Handle.BrickColor = BrickColor.new("Bright red")
- d[i].HeartDecoration.HeartMesh.Scale = Vector3.new(0.4,0.1,0.4)
- game.Debris:AddItem(d[i],1.5)
- end
- end
- end
- wait(1.5)
- anim2:Stop()
- enabled3.Value = true
- end
- end)
- script.Parent.counterShockRelease.OnServerEvent:Connect(function(plr, power)
- local char = plr.Character
- part = Instance.new("Part")
- part.BrickColor = BrickColor.new("Dark stone grey")
- part.CanCollide = false
- part.Anchored = true
- part.Transparency = 1
- part.Size = Vector3.new(10,10,10)
- creat = Instance.new("ObjectValue")
- creat.Parent = part
- creat.Name = "creator"
- creat.Value = plr
- chargetag = Instance.new("IntValue")
- chargetag.Parent = part
- chargetag.Name = "ChargeTag"
- chargetag.Value = power
- part.CFrame = char.Torso.CFrame*CFrame.new(0,0,-5)
- part.Parent = game.Workspace
- sho = script.Shock:clone()
- sho.Parent = part
- sho.Disabled = false
- game.Debris:AddItem(part,1)
- part1 = Instance.new("Part")
- part1.Parent = char
- part1.BrickColor = BrickColor.new("Dark stone grey")
- part1.CanCollide = false
- part1.Transparency = 1
- part1.Size = Vector3.new(power,power,power)
- mesh = script.ShockImage:clone()
- mesh.Parent = part1
- mesh.Enabled = true
- w = Instance.new("Weld")
- w.Parent = char["Left Arm"]
- w.Part0 = char["Left Arm"]
- w.Part1 = part1
- w.C0 = CFrame.new(0,-1.25,0)
- w.C1 = CFrame.Angles(0,0,0)
- wait(1)
- --char.Torso.PointLight:Destroy()
- part1:remove()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement