Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By Rufus14
- --Converted with ttyyuu12345's model to script plugin v4
- Tool0 = Instance.new("Tool")
- Part2 = Instance.new("Part")
- Sound3 = Instance.new("Sound")
- Sound4 = Instance.new("Sound")
- SpecialMesh5 = Instance.new("SpecialMesh")
- Sound6 = Instance.new("Sound")
- Sound7 = Instance.new("Sound")
- Tool0.Name = "Bone"
- Tool0.Grip = CFrame.new(0, 0, -1, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Tool0.GripForward = Vector3.new(-1, -0, -0)
- Tool0.GripPos = Vector3.new(0, 0, -1)
- Tool0.GripRight = Vector3.new(0, 1, 0)
- Tool0.GripUp = Vector3.new(0, 0, 1)
- Tool0.ToolTip = "see: Bloody Battle"
- Part2.Name = "Handle"
- Part2.Parent = Tool0
- Part2.CFrame = CFrame.new(-4.13499451, 2.47999811, -8.17498779, 0, 1, -1.67022213e-15, -5.83196259e-21, 1.67022213e-15, 1, 1, 9.74067324e-36, 5.83196259e-21)
- Part2.Orientation = Vector3.new(-90, -90, 0)
- Part2.Position = Vector3.new(-4.13499451, 2.47999811, -8.17498779)
- Part2.Rotation = Vector3.new(-90, 0, -90)
- Part2.Color = Color3.new(0.929412, 0.917647, 0.917647)
- Part2.Size = Vector3.new(0.350000024, 0.529999852, 4.35999823)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.BrickColor = BrickColor.new("Lily white")
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part2.brickColor = BrickColor.new("Lily white")
- Part2.FormFactor = Enum.FormFactor.Plate
- Part2.formFactor = Enum.FormFactor.Plate
- Sound3.Name = "dodge"
- Sound3.Parent = Part2
- Sound3.SoundId = "rbxassetid://357417055"
- Sound3.Volume = 2.5
- Sound4.Name = "damage"
- Sound4.Parent = Part2
- Sound4.SoundId = "rbxassetid://410625063"
- Sound4.Volume = 2.5
- SpecialMesh5.Parent = Part2
- SpecialMesh5.MeshId = "rbxassetid://523610338"
- SpecialMesh5.Scale = Vector3.new(0.0250000004, 0.0250000004, 0.0250000004)
- SpecialMesh5.MeshType = Enum.MeshType.FileMesh
- Sound6.Name = "shoot"
- Sound6.Parent = Part2
- Sound6.SoundId = "rbxassetid://340722848"
- Sound6.Volume = 2
- Sound7.Name = "pullout"
- Sound7.Parent = Part2
- Sound7.SoundId = "rbxassetid://422747271"
- Sound7.Volume = 2
- Tool0.Parent = owner.Character
- coroutine.wrap(function()
- --By Rufus14
- tool = Tool0
- handle = tool.Handle
- dodgesound = handle.dodge
- hitsound = handle.damage
- pulloutsound = handle.pullout
- shootsound = handle.shoot
- owner = nil
- character = nil
- runservice = game:GetService("RunService")
- cananimate = true
- equipped = true
- canattack = true
- candodgeanim = true
- mousepress = false
- autobreak = false
- dodges = 0
- farmedhp = 0
- handle.Touched:connect(function(part)
- local hum = part.Parent:findFirstChildOfClass("Humanoid")
- if hum and tool.Parent ~= workspace then
- hitsound:Play()
- hum.Health = hum.Health - 1
- farmedhp = farmedhp + 1
- if farmedhp == 60 then
- farmedhp = 0
- dodges = dodges + 1
- print("new dodge "..tostring(dodges))
- end
- end
- end)
- tool.Deactivated:connect(function()
- mousepress = false
- end)
- tool.Activated:connect(function()
- mousepress = true
- if canattack then
- cananimate = false
- canattack = false
- local rightarmweld = character.Torso:findFirstChild("RightArmWeldbone")
- local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbone")
- for i = 0,1 , 0.07 do
- rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ(0,math.rad(10),0),i)
- rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.rad(30),math.rad(50),math.rad(-20)) * CFrame.new(0,-0.5,0),i)
- runservice.Stepped:wait()
- end
- for i = 0,1 , 0.1 do
- rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ(0,math.rad(-20),0),i)
- rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi-math.rad(30),math.rad(-30),math.rad(30)) * CFrame.new(0,-0.5,0),i)
- runservice.Stepped:wait()
- end
- canattack = true
- cananimate = true
- if mousepress then
- local gasterblaster = Instance.new("Part", character.Head)
- gasterblaster.Size = Vector3.new(16, 0, 20)
- gasterblaster.Transparency = 1
- gasterblaster.CanCollide = false
- gasterblaster.Anchored = true
- local gasterdecal = Instance.new("Decal", gasterblaster)
- gasterdecal.Texture = "http://www.roblox.com/asset/?id=323497117"
- gasterdecal.Face = "Top"
- local gasterdecal1 = Instance.new("Decal", gasterblaster)
- gasterdecal1.Texture = "http://www.roblox.com/asset/?id=323497117"
- gasterdecal1.Face = "Bottom"
- gasterblaster.CFrame = character.Head.CFrame
- pulloutsound.TimePosition = 0.2
- pulloutsound:Play()
- coroutine.wrap(function()
- local torsopos = character.HumanoidRootPart.CFrame
- for i = 0,0.5 , 0.01 do
- gasterblaster.CFrame = gasterblaster.CFrame:lerp(torsopos * CFrame.new(0,6.5,7) * CFrame.fromEulerAnglesXYZ(math.rad(-15),0,0),i)
- runservice.Stepped:wait()
- end
- shootsound:Play()
- local beam = Instance.new("Part", gasterblaster)
- beam.Material = "Neon"
- beam.Anchored = true
- beam.Shape = "Cylinder"
- beam.Size = Vector3.new(100,6,6)
- beam.CanCollide = false
- beam.CFrame = gasterblaster.CFrame * CFrame.new(0,0,-54)
- beam.CFrame = beam.CFrame * CFrame.fromEulerAnglesXYZ(0,math.pi/2,0)
- beam.Touched:connect(function(part)
- local hum = part.Parent:findFirstChildOfClass("Humanoid")
- if hum and part.Parent ~= character then
- hitsound:Play()
- hum.Health = hum.Health - 1
- farmedhp = farmedhp + 1
- if farmedhp == 60 then
- farmedhp = 0
- dodges = dodges + 1
- print("new dodge "..tostring(dodges))
- end
- end
- end)
- local sin = 0
- for i = 1,100 do
- sin = sin + 1
- beam.Size = Vector3.new(100,6+math.sin(sin/2)/1.5,6+math.sin(sin/2)/1.5)
- beam.Transparency = beam.Transparency + 0.01
- gasterdecal.Transparency = gasterdecal.Transparency + 0.01
- gasterdecal1.Transparency = gasterdecal1.Transparency + 0.01
- gasterblaster.CFrame = gasterblaster.CFrame * CFrame.fromEulerAnglesXYZ(0,0,0.3)
- runservice.Stepped:wait()
- end
- gasterblaster:destroy()
- end)()
- end
- end
- end)
- tool.Equipped:connect(function()
- equipped = true
- owner = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent)
- character = owner.Character
- cananimate = true
- local rootpart = character.HumanoidRootPart
- local humanoid = character:findFirstChildOfClass("Humanoid")
- local rightarm = Instance.new("Weld", owner.Character.Torso)
- rightarm.Part0 = owner.Character.Torso
- rightarm.Part1 = owner.Character["Right Arm"]
- rightarm.C0 = CFrame.new(1.5,0,0)
- rightarm.Name = "RightArmWeldbone"
- local humanoidrootpart = Instance.new("Weld", rootpart)
- humanoidrootpart.Part0 = rootpart
- humanoidrootpart.Part1 = owner.Character.Torso
- humanoidrootpart.Name = "HumanoidRootPartWeldbone"
- local humhp = humanoid.Health
- coroutine.wrap(function()
- while equipped and runservice.Stepped:wait() do --[[print("equipped")--]] end
- while not equipped and runservice.Stepped:wait() do --[[print("not equipped, waiting for another equip")--]] end
- --print("equipped, autobreak is true")
- autobreak = true
- end)()
- coroutine.wrap(function()
- local savedchar = character
- while runservice.Stepped:wait() and savedchar == character do
- if autobreak then
- autobreak = false
- --print("broke, autobreak is false")
- break
- end
- if humanoid.Health < humhp then
- if dodges > 0 then
- dodges = dodges - 1
- humanoid.Health = humhp
- dodgesound:Play()
- if candodgeanim then
- candodgeanim = false
- local rightarmm = Instance.new("Weld", owner.Character.Torso)
- rightarmm.Part0 = owner.Character.Torso
- rightarmm.Part1 = owner.Character["Right Arm"]
- rightarmm.C0 = CFrame.new(1.5,0,0)
- rightarmm.Name = "RightArmWeldbonedodge"
- local leftarmm = Instance.new("Weld", owner.Character.Torso)
- leftarmm.Part0 = owner.Character.Torso
- leftarmm.Part1 = owner.Character["Left Arm"]
- leftarmm.C0 = CFrame.new(-1.5,0,0)
- leftarmm.Name = "LeftArmWeldbonedodge"
- local headd = Instance.new("Weld", owner.Character.Torso)
- headd.Part0 = owner.Character.Torso
- headd.Part1 = owner.Character.Head
- headd.C0 = CFrame.new(0,1.5,0)
- headd.Name = "HeadWeldbonedodge"
- local humanoidrootpartt = Instance.new("Weld", rootpart)
- humanoidrootpartt.Part0 = rootpart
- humanoidrootpartt.Part1 = owner.Character.Torso
- humanoidrootpartt.Name = "HumanoidRootPartWeldbonedodge"
- coroutine.wrap(function()
- wait()
- humanoid.PlatformStand = false
- end)()
- coroutine.wrap(function()
- local sine = 0
- if math.random(1,2) == 1 then
- for i = 1,30 do
- sine = sine + 1
- humanoidrootpartt.C0 = humanoidrootpartt.C0:lerp(CFrame.new(math.cos(sine/17)*3.5,0,0) * CFrame.fromEulerAnglesXYZ(0,math.cos(sine/17),0), 0.2)
- runservice.Stepped:wait()
- end
- else
- for i = 1,30 do
- sine = sine + 1
- humanoidrootpartt.C0 = humanoidrootpartt.C0:lerp(CFrame.new(-math.cos(sine/17)*3.5,0,0) * CFrame.fromEulerAnglesXYZ(0,-math.cos(sine/17),0), 0.2)
- runservice.Stepped:wait()
- end
- end
- rightarmm:destroy()
- leftarmm:destroy()
- headd:destroy()
- humanoidrootpartt:destroy()
- candodgeanim = true
- end)()
- coroutine.wrap(function()
- for i = 0,1 , 0.05 do
- headd.C0 = headd.C0:lerp(CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(20)) * CFrame.new(0,0.5,0),i)
- rightarmm.C0 = rightarmm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi,0,math.rad(30)) * CFrame.new(0,-0.5,0),i)
- leftarmm.C0 = leftarmm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi,0,math.rad(-30)) * CFrame.new(0,-0.5,0),i)
- runservice.Stepped:wait()
- end
- end)()
- end
- end
- end
- humhp = humanoid.Health
- end
- --print("lost bone/equipped again")
- end)()
- coroutine.wrap(function()
- while runservice.Stepped:wait() and equipped do
- if cananimate then
- humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(),0.1)
- rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0,0.2) * CFrame.fromEulerAnglesXYZ(0,math.rad(-30),0),0.1)
- end
- end
- end)()
- end)
- tool.Unequipped:connect(function()
- equipped = false
- if character.Torso:findFirstChild("RightArmWeldbone") then
- character.Torso:findFirstChild("RightArmWeldbone"):destroy()
- end
- if character:findFirstChild("HumanoidRootPart") then
- if character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbone") then
- character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbone"):destroy()
- end
- end
- end)
- end)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement