Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- sdfsdfsdfsd
- --VARIABLES AND STUFF--
- sdfsdfsdfsdf
- ]]
- --charge attck maybe?
- --certain part of sword lights a different color and particles go to it
- --next sword just make it a black/white particle sword with 1 part
- --shooting thing like move q in first fly script. when touching a wall just bullet effect like cor (bubble)
- --grass or particle spin around me to defend me
- --a bunch or one circle where parts randomly come out from the ground and hurt ppl
- plr = game.Players.LocalPlayer
- chr = plr.Character or plr.Character:wait()
- mouse = plr:GetMouse()
- renderstepped = game:GetService('RunService').RenderStepped
- userinput = game:GetService('UserInputService')
- torso = chr.Torso
- head = chr.Head
- hrp = chr.HumanoidRootPart
- myhumanoid = chr.Humanoid
- terrain = workspace.Terrain
- rightarm = chr['Right Arm']
- leftarm = chr['Left Arm']
- rightleg = chr['Right Leg']
- leftleg = chr['Left Leg']
- myhumanoid.JumpPower = 0
- myhumanoid.MaxHealth = 1000
- pi = math.pi
- huge = math.huge
- part = Instance.new('Part')
- part.TopSurface = 'Smooth'
- part.BottomSurface = 'Smooth'
- cylmesh = Instance.new('CylinderMesh')
- specialmesh = Instance.new('SpecialMesh')
- attacking = false
- defending = false
- typing = false
- swordweldA = Instance.new('Weld')
- swordweldB = Instance.new('Weld')
- rightweld = nil
- leftweld = nil
- damage = 0
- --[[
- dfsdfsdfsdfs
- BLOODPART
- asdasdasda
- ]]
- bloodpart = part:Clone()
- bloodpart.CanCollide = false
- bloodpart.Anchored = true
- bloodpart.Shape = Enum.PartType.Ball
- bloodpart.Size = Vector3.new(.4,.4,.4)
- bloodpart.Transparency = .8
- bloodpart.Material = Enum.Material.Neon
- bloodpart.BrickColor = BrickColor.Red()
- local bbgui = Instance.new('BillboardGui',bloodpart)
- bbgui.StudsOffset = Vector3.new(0,.5,0)
- bbgui.Enabled = true
- bbgui.Size = UDim2.new(0,50,0,25)
- local tlabel = Instance.new('TextLabel',bbgui)
- tlabel.BackgroundTransparency = 0
- tlabel.BackgroundColor3 = Color3.fromRGB(192, 57, 43)
- tlabel.BorderSizePixel = 0
- tlabel.TextColor3 = Color3.new(1,1,1)
- tlabel.Font = Enum.Font.Legacy
- tlabel.Size = UDim2.new(0,50,0,25)
- --[[
- SGFSDGSDGS
- FUNCTIONS
- SDFSDFSDFSDF
- ]]
- function plerp(part,startpoint,endpoint,speed,canclone,clonepart,clonepartcframe,transpeed)
- for i = 0,1,speed do
- renderstepped:wait()
- part.CFrame = startpoint:lerp(endpoint,i)
- if canclone then
- local clone = clonepart:Clone()
- clone.CFrame = clone.CFrame*CFrame.Angles(math.random(-180,180),math.random(-180,180),math.random(-180,180))
- clone:ClearAllChildren()
- clone.Anchored = true
- clone.CanCollide = false
- clone.Parent = workspace
- local function tran()
- for i = 0,1,transpeed do
- renderstepped:wait()
- clone.Transparency = i
- end
- clone:Destroy()
- end
- spawn(tran)
- end
- end
- end
- function get_joints(a,b)
- local joint = torso:FindFirstChild('Right Shoulder')
- a = joint:Clone()
- joint = torso:FindFirstChild('Left Shoulder')
- b = joint:Clone()
- end
- function heal()
- local bf = chr:FindFirstChild('BodyForce',true)
- local bv = chr:FindFirstChild('BodyAngularVelocity',true)
- if bf then
- bf:Destroy()
- elseif bv then
- bv:Destroy()
- else
- myhumanoid.Sit = false
- myhumanoid.PlatformStand = false
- end
- myhumanoid:TakeDamage(math.random(-20,0))
- end
- function get_rightweld()
- rightweld = Instance.new('Weld')
- rightweld.Part0 = rightarm
- rightweld.Part1 = torso
- end
- function get_leftweld()
- leftweld = Instance.new('Weld')
- leftweld.Part0 = leftarm
- leftweld.Part1 = torso
- end
- function weldlerp(weld,speed,startpoint,endpoint,clone,clonepart,clonepartcframe,transpeed)
- for i = 0,1,speed do
- renderstepped:wait()
- weld.C0 = startpoint:lerp(endpoint,i)
- if clone == true then
- local clone = clonepart:Clone()
- clone:ClearAllChildren()
- clone.Anchored = true
- clone.CFrame = clonepart.CFrame
- clone.Parent = workspace
- local function tran()
- for i = 0,1,transpeed do
- renderstepped:wait()
- clone.Transparency = i
- end
- clone:Destroy()
- end
- spawn(tran)
- end
- end
- end
- --
- function new_weld(parent,part0,part1,C0)
- local weld = Instance.new('Weld',parent)
- weld.Part0 = part0
- weld.Part1 = part1
- weld.C0 = C0
- end
- --
- function bloodcframe(random,torso,humanoid)
- if random ~= 0 then
- local clone = bloodpart:Clone()
- clone.BillboardGui.TextLabel.Text = random
- clone.CFrame = torso.Parent:FindFirstChild('Torso').CFrame*CFrame.new(math.random(-3,3),math.random(-3,3),math.random(-3,3))
- clone.Parent = workspace
- humanoid:TakeDamage(random)
- damage = 0
- for i = 1,.5,-.01 do
- renderstepped:wait()
- clone.Transparency = i
- clone.BillboardGui.TextLabel.Transparency = i
- clone.CFrame = clone.CFrame*CFrame.new(0,.01,0)
- end
- wait(1)
- for i = .5,1,.01 do
- renderstepped:wait()
- clone.Transparency = i
- clone.BillboardGui.TextLabel.Transparency = i
- clone.CFrame = clone.CFrame*CFrame.new(0,.01,0)
- end
- clone:Destroy()
- end
- end
- function bloodcframeB(random,torso,humanoid)
- if random ~= 0 then
- local clone = bloodpart:Clone()
- clone.BillboardGui.TextLabel.Text = random
- clone.CFrame = torso.Parent:FindFirstChild('Torso').CFrame*CFrame.new(math.random(-3,3),math.random(-3,3),math.random(-3,3))
- clone.Parent = workspace
- humanoid:TakeDamage(random)
- for i = 1,.5,-.01 do
- renderstepped:wait()
- clone.Transparency = i
- clone.BillboardGui.TextLabel.Transparency = i
- clone.CFrame = clone.CFrame*CFrame.new(0,.01,0)
- end
- wait(1)
- for i = .5,1,.01 do
- renderstepped:wait()
- clone.Transparency = i
- clone.BillboardGui.TextLabel.Transparency = i
- clone.CFrame = clone.CFrame*CFrame.new(0,.01,0)
- end
- clone:Destroy()
- end
- end
- --[[
- SDFSDFSDFSDF
- MAKING OF THY SWORD
- SDFSDFDSFSF
- ]]
- swordmodel = Instance.new('Model')
- swordmodel.Name = 'Sword'
- --
- swordHandle = part:Clone()
- --swordHandle.Anchored = true
- swordHandle.Parent = swordmodel
- swordHandle.Name = 'SHandle'
- swordHandle.BrickColor = BrickColor.new(0,0,0)
- swordHandle.Material = Enum.Material.Neon
- swordHandle.CanCollide = false
- swordHandle.Size = Vector3.new(0.2, 2, 0.4)
- swordHandle.CFrame = CFrame.new(0,0,0)
- --
- swordHitBox = swordHandle:Clone()
- swordHitBox.Size = Vector3.new(0.2, 6.6, 1)
- swordHitBox.CFrame = CFrame.new(0, -2.1, 0)
- swordHitBox.Parent = swordmodel
- swordHitBox.Transparency = 1
- swordHitBox.Name = 'HitBox'
- --
- swordTip = swordHandle:Clone()
- swordTip.Name = 'STip'
- swordTip.Size = Vector3.new(0.2, 0.2, 0.2)
- swordTip.CFrame = CFrame.new(0, -5.5, 0)
- swordTip.Parent = swordmodel
- swordTip.Transparency = 1
- --
- swordbladeRight = swordHandle:Clone()
- swordbladeRight.Name = 'Part'
- swordbladeRight.Parent = swordmodel
- swordbladeRight.Size = Vector3.new(0.2, 4, 0.4)
- swordbladeRight.CFrame = CFrame.new(0, -3, -0.3)
- --
- swordbladeLeft = swordbladeRight:Clone()
- swordbladeLeft.Name = 'Part'
- swordbladeLeft.Parent = swordmodel
- swordbladeLeft.CFrame = CFrame.new(0, -3, 0.3)
- --
- swordbladeMiddle = swordbladeLeft:Clone()
- swordbladeMiddle.Parent = swordmodel
- swordbladeMiddle.Name = 'Part'
- swordbladeMiddle.Size = Vector3.new(0.2, 0.5, 0.4)
- swordbladeMiddle.CFrame = CFrame.new(0, -1.05, 0)
- --
- swordcylRight = swordHandle:Clone()
- swordcylRight.Parent = swordmodel
- swordcylRight.Name = 'Part'
- cmeshA = specialmesh:Clone()
- cmeshA.MeshType = Enum.MeshType.Cylinder
- cmeshA.Parent = swordcylRight
- swordcylRight.Size = Vector3.new(0.2, 0.6, 0.6)
- swordcylRight.CFrame = CFrame.new(0, -1, -0.2)
- --
- swordcylLeft = swordcylRight:Clone()
- swordcylLeft.Name = 'Part'
- swordcylLeft.Parent = swordmodel
- swordcylLeft.CFrame = CFrame.new(0, -1, 0.2)
- --
- swordcylUp = swordcylLeft:Clone()
- swordcylUp.Name = 'Part'
- swordcylUp.Parent = swordmodel
- swordcylUp.Size = Vector3.new(0.2, 0.6, 0.4)
- swordcylUp.CFrame = CFrame.new(0, 1, 0)
- --
- swordwedgeRight = Instance.new('WedgePart',swordmodel)
- swordwedgeRight.Name = 'Part'
- swordwedgeRight.Size = Vector3.new(0.2, 0.4, 0.4)
- swordwedgeRight.CFrame = CFrame.new(0, -5.2, -0.3)*CFrame.Angles(math.rad(-90), 0, 0)
- swordwedgeRight.BrickColor = BrickColor.new(0,0,0)
- swordwedgeRight.Material = Enum.Material.Neon
- swordwedgeRight.CanCollide = false
- --
- swordwedgeLeft = swordwedgeRight:Clone()
- swordwedgeLeft.Name = 'Part'
- swordwedgeLeft.Parent = swordmodel
- swordwedgeLeft.CFrame = CFrame.new(0, -5.2, 0.3)*CFrame.Angles(math.rad(-90), 0, math.rad(-180))
- --
- swordA = nil
- swordB = nil
- --
- all,last = {}
- function scan(p)
- for i,v in pairs(p:GetChildren()) do
- if (v:IsA("BasePart")) then
- v.CanCollide = false
- if (last) then
- local w = Instance.new("Weld")
- w.Part0,w.Part1 = last,v
- w.C0 = v.CFrame:toObjectSpace(last.CFrame):inverse()
- w.Parent = last
- if v == swordHandle then
- print(w.C0)
- end
- end
- table.insert(all,v)
- last = v
- end
- scan(v)
- end
- end
- scan(swordmodel)
- for i,v in pairs(all) do v.Anchored = false end
- function get_Swords()
- for i = 1,2 do
- wait(.4)
- if i == 1 then
- local clone = swordmodel:Clone()
- for i,v in pairs(clone:GetChildren()) do
- v.BrickColor = BrickColor.new(0,0,0)
- end
- swordA = clone
- swordweldA.Parent = clone.SHandle
- swordweldA.Part0 = clone.SHandle
- swordweldA.Part1 = rightarm
- swordweldA.C0 = CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0)
- clone.Parent = chr
- else
- local clone = swordmodel:Clone()
- for i,v in pairs(clone:GetChildren()) do
- v.BrickColor = BrickColor.new(1,1,1)
- end
- swordB = clone
- swordweldB.Parent = clone.SHandle
- swordweldB.Part0 = clone.SHandle
- swordweldB.Part1 = leftarm
- swordweldB.C0 = CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0)
- clone.Parent = chr
- end
- end
- swordA.HitBox.Touched:connect(function(p)
- if p.Parent then
- local h = p.Parent:FindFirstChild('Humanoid')
- if h and h~=myhumanoid and damage~=0 then
- bloodcframe(damage,h.Parent.Head,h)
- end
- end
- end)
- swordB.HitBox.Touched:connect(function(p)
- if p.Parent then
- local h = p.Parent:FindFirstChild('Humanoid')
- if h and h~=myhumanoid and damage~=0 then
- bloodcframe(damage,h.Parent.Head,h)
- end
- end
- end)
- end
- get_Swords()
- --[[
- SDFGSDFSDFS
- KEYS
- SDFSDFSD
- ]]
- myhumanoid.Health = 1000
- mouse.Button1Down:connect(function()
- if typing then
- typing = false
- elseif not attacking and not typing then
- attacking = true
- damage = math.random(20,40)
- local joint = torso:FindFirstChild('Right Shoulder')
- local jointA = joint:Clone()
- get_rightweld()
- rightweld.Parent = rightarm
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,0),CFrame.new(-1.5,1.5,0)*CFrame.Angles(math.rad(180),0,0),true,swordA.Part,swordA.Part.CFrame,.05)
- weldlerp(rightweld,.1,CFrame.new(-1.5,1.5,0)*CFrame.Angles(math.rad(180),0,0),CFrame.new(-1.5,0,.5)*CFrame.Angles(math.rad(-0),math.rad(-45),0),true,swordA.Part,swordA.Part.CFrame,.05)
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,.5)*CFrame.Angles(math.rad(-0),math.rad(-45),0),CFrame.new(-1.5,0,0),true,swordA.Part,swordA.Part.CFrame,.05)
- rightweld:Destroy()
- jointA.Parent = torso
- attacking = false
- damage = 0
- end
- end)
- mouse.Button2Down:connect(function()
- if not attacking and not typing then
- attacking = true
- damage = math.random(20,40)
- local joint = torso:FindFirstChild('Left Shoulder')
- local jointA = joint:Clone()
- get_leftweld()
- leftweld.Parent = leftarm
- weldlerp(leftweld,.1,CFrame.new(1.5,0,0),CFrame.new(1.5,1.5,.5)*CFrame.Angles(180,0,0),true,swordB.Part,swordB.Part.CFrame,.05)
- weldlerp(leftweld,.1,CFrame.new(1.5,1.5,0)*CFrame.Angles(math.rad(180),0,0),CFrame.new(1.5,0,.5)*CFrame.Angles(math.rad(-0),math.rad(45),0),true,swordB.Part,swordB.Part.CFrame,.05)
- weldlerp(leftweld,.1,CFrame.new(1.5,0,.5)*CFrame.Angles(math.rad(-0),math.rad(45),0),CFrame.new(1.5,0,0),true,swordB.Part,swordB.Part.CFrame,.05)
- leftweld:Destroy()
- jointA.Parent = torso
- attacking = false
- damage = 0
- end
- end)
- --weld,speed,startpoint,endpoint,clone,clonepart,clonepartcframe,transpeed
- userinput.InputBegan:connect(function(keycode)
- local k = keycode.KeyCode
- if k == Enum.KeyCode.Slash then
- typing = true
- elseif k == Enum.KeyCode.Return then
- typing = false
- elseif not typing then
- if k == Enum.KeyCode.Q and not defending then
- defending = true
- local model = Instance.new('Model',workspace)
- local trail = part:Clone()
- local cframeval = CFrame.new()
- trail.BrickColor = BrickColor.new(1,1,1)
- trail.Material = Enum.Material.Neon
- trail.CanCollide = false
- trail.Anchored = true
- trail.Size = Vector3.new(2,5,.2)
- trail.Transparency = .5
- local cframeval = hrp.CFrame*CFrame.new(0,1.7,0)
- local endpoint = cframeval+(cframeval.rightVector*-40)
- for i = 0,1,.05 do
- renderstepped:wait()
- myhumanoid.WalkSpeed = 0
- local clone = trail:Clone()
- local function tran()
- for i = .5,1.01,.01 do
- renderstepped:wait()
- clone.Transparency = i
- end
- end
- spawn(tran)
- clone.CFrame = hrp.CFrame
- clone.Parent = model
- chr:SetPrimaryPartCFrame(cframeval:lerp(endpoint,i))
- end
- myhumanoid.WalkSpeed = 16
- defending = false
- wait(1)
- model:Destroy()
- elseif k == Enum.KeyCode.E and not defending then
- defending = true
- local model = Instance.new('Model',workspace)
- local trail = part:Clone()
- local cframeval = CFrame.new()
- trail.BrickColor = BrickColor.new(1,1,1)
- trail.Material = Enum.Material.Neon
- trail.CanCollide = false
- trail.Anchored = true
- trail.Size = Vector3.new(2,5,.2)
- trail.Transparency = .5
- local cframeval = hrp.CFrame*CFrame.new(0,1.7,0)
- local endpoint = cframeval+(cframeval.rightVector*40)
- for i = 0,1,.05 do
- renderstepped:wait()
- myhumanoid.WalkSpeed = 0
- local clone = trail:Clone()
- local function tran()
- for i = .5,1.01,.01 do
- renderstepped:wait()
- clone.Transparency = i
- end
- end
- spawn(tran)
- clone.CFrame = hrp.CFrame
- clone.Parent = model
- chr:SetPrimaryPartCFrame(cframeval:lerp(endpoint,i))
- end
- myhumanoid.WalkSpeed = 16
- defending = false
- wait(1)
- model:Destroy()
- elseif k == Enum.KeyCode.Space and not defending then
- defending = true
- local model = Instance.new('Model',workspace)
- local trail = part:Clone()
- local cframeval = CFrame.new()
- trail.BrickColor = BrickColor.new(1,1,1)
- trail.Material = Enum.Material.Neon
- trail.CanCollide = false
- trail.Anchored = true
- trail.Size = Vector3.new(.2,5,2)
- trail.Transparency = .5
- local cframeval = hrp.CFrame*CFrame.new(0,1.7,0)
- local endpoint = cframeval+(cframeval.lookVector*40)
- for i = 0,1,.05 do
- renderstepped:wait()
- myhumanoid.WalkSpeed = 0
- local clone = trail:Clone()
- local function tran()
- for i = .5,1.01,.01 do
- renderstepped:wait()
- clone.Transparency = i
- end
- end
- spawn(tran)
- clone.CFrame = hrp.CFrame
- clone.Parent = model
- chr:SetPrimaryPartCFrame(cframeval:lerp(endpoint,i))
- end
- myhumanoid.WalkSpeed = 16
- defending = false
- wait(1)
- model:Destroy()
- elseif k == Enum.KeyCode.Two and not defending then
- defending = true
- local model = Instance.new('Model',workspace)
- local trail = part:Clone()
- local cframeval = CFrame.new()
- trail.BrickColor = BrickColor.new(1,1,1)
- trail.Material = Enum.Material.Neon
- trail.CanCollide = false
- trail.Anchored = true
- trail.Size = Vector3.new(.2,5,2)
- trail.Transparency = .5
- local cframeval = hrp.CFrame*CFrame.new(0,1.7,0)
- local endpoint = cframeval+(cframeval.lookVector*-40)
- for i = 0,1,.05 do
- renderstepped:wait()
- myhumanoid.WalkSpeed = 0
- local clone = trail:Clone()
- local function tran()
- for i = .5,1.01,.01 do
- renderstepped:wait()
- clone.Transparency = i
- end
- end
- spawn(tran)
- clone.CFrame = hrp.CFrame
- clone.Parent = model
- chr:SetPrimaryPartCFrame(cframeval:lerp(endpoint,i))
- end
- myhumanoid.WalkSpeed = 16
- defending = false
- wait(1)
- model:Destroy()
- elseif k == Enum.KeyCode.One then
- get_Swords()
- elseif k == Enum.KeyCode.R and not defending and not attacking then
- defending = true
- attacking = true
- local model = Instance.new('Model',terrain)
- model.Name = 'Circle'
- local shield = part:Clone()
- shield.Material = Enum.Material.Neon
- shield.BrickColor = BrickColor.new(1,1,1)
- shield.Transparency = 1
- shield.CanCollide = true
- shield.Anchored = true
- shield.Size = Vector3.new(.4,.4,.4)
- torso.Anchored = true
- local tcframe = hrp.CFrame
- local diameter = 8
- local circ = pi*diameter
- local n = circ/.4
- local rot = 360/n
- for i = 0,n/2 do
- renderstepped:wait()
- local clone = shield:Clone()
- clone.Touched:connect(function(p)
- if p.Parent and p.Parent ~= chr and p.Parent.Parent ~= chr and p.Name ~= 'Base' then
- p:Destroy()
- end
- end)
- local function tran()
- local CFrameval = clone.CFrame
- for i = .4,8,.2 do
- renderstepped:wait()
- clone.Size = Vector3.new(.4,i,.4)
- clone.CFrame = CFrameval
- clone.Transparency = clone.Transparency - .05
- end
- end
- clone.CFrame = tcframe*CFrame.Angles(0,0,math.rad(i*rot))+tcframe.lookVector*10
- clone.Parent = model
- spawn(tran)
- end
- elseif k == Enum.KeyCode.F and not attacking then
- attacking = true
- local joint = torso:FindFirstChild('Right Shoulder')
- local jointA = joint:Clone()
- local joint = torso:FindFirstChild('Left Shoulder')
- local jointB = joint:Clone()
- damage = math.random(30,60)
- get_rightweld()
- rightweld.Parent = rightarm
- get_leftweld()
- leftweld.Parent = leftarm
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,0),CFrame.new(-1.5,1,.5)*CFrame.Angles(math.rad(-146.31),math.rad(-25.659),math.rad(-16.102)))
- end
- local function lerpB()
- weldlerp(leftweld,.1,CFrame.new(1.5,0,0),CFrame.new(1.5,1,.5)*CFrame.Angles(math.rad(-146.31),math.rad(25.659),math.rad(16.102)))
- end
- spawn(lerpA)
- spawn(lerpB)
- wait(.2)
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.new(-1.5,1,.5)*CFrame.Angles(math.rad(-146.31),math.rad(-25.659),math.rad(-16.102)),CFrame.new(-1.5,0,-.5)*CFrame.Angles(math.rad(-0),math.rad(-25),0))
- end
- local function lerpB()
- weldlerp(leftweld,.1,CFrame.new(1.5,1,.5)*CFrame.Angles(math.rad(-146.31),math.rad(25.659),math.rad(16.102)),CFrame.new(1.5,0,-.5)*CFrame.Angles(math.rad(-0),math.rad(25),0))
- end
- spawn(lerpA)
- spawn(lerpB)
- wait(.2)
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,-.5)*CFrame.Angles(math.rad(-0),math.rad(-25),0),CFrame.new(-1.5,0,0))
- end
- local function lerpB()
- weldlerp(leftweld,.1,CFrame.new(1.5,0,-.5)*CFrame.Angles(math.rad(-0),math.rad(25),0),CFrame.new(1.5,0,0))
- end
- spawn(lerpA)
- spawn(lerpB)
- damage = 0
- wait(.21)
- attacking = false
- jointA.Parent = torso
- jointB.Parent = torso
- rightweld:Destroy()
- leftweld:Destroy()
- elseif k == Enum.KeyCode.Z and not attacking and not defending then
- --charged attack?
- attacking = true
- defending = true
- local joint = torso:FindFirstChild('Right Shoulder')
- local jointclone = nil
- if joint then
- jointclone = joint
- end
- get_rightweld()
- rightweld.Parent = rightarm
- damage = 50
- local model = Instance.new('Model',chr)
- model.Name = 'lol'
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,0),CFrame.new(-1.5,1.5,0)*CFrame.Angles(math.rad(180),0,0))
- end
- local function lerpB()
- weldlerp(swordweldA,.1,CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0, 1, 0)*CFrame.Angles(0,0,0))
- end
- spawn(lerpA)
- spawn(lerpB)
- local function particle()
- wait(math.random())
- local clone = part:Clone()
- clone.Size = Vector3.new(.2,.2,.2)
- clone.Anchored = true
- clone.Material = Enum.Material.Neon
- clone.BrickColor = BrickColor.new(0,0,0)
- clone.Transparency = math.random()
- clone.CanCollide = false
- clone.Parent = model
- clone.CFrame = torso.CFrame*CFrame.new(math.random(-5,5),math.random(-1,5),math.random(-5,5))
- local CFrameval = clone.CFrame
- for i = 0,1,.05 do
- local attckpart = chr:FindFirstChild('ATTCKZ')
- if attckpart then
- renderstepped:wait()
- clone.CFrame = CFrameval:lerp(attckpart.CFrame,i)
- end
- end
- clone:Destroy()
- end
- local function tiprot()
- local x = 0
- local y = 0
- local z = 0
- local size = .2
- local add = true
- local part = part:Clone()
- part.Name = 'ATTCKZ'
- if attacking and defending then
- part.Transparency = .5
- part.Material = Enum.Material.Neon
- part.BrickColor = BrickColor.new(0,0,0)
- part.Anchored = true
- part.CanCollide = false
- part.Size = Vector3.new(.2,.2,.2)
- part.Parent = chr
- end
- while renderstepped:wait() and attacking and defending and part~=nil do
- if x > 360 then
- x = 0
- elseif y > 360 then
- y = 0
- elseif size > 2 and add == true then
- add = false
- elseif size <.4 and add == false then
- add = true
- end
- if add == true then
- size = size+.1
- else
- size = size-.1
- end
- x = x+3
- y = y+2
- z = z+4
- damage = damage+(math.random()/math.random(2,4))
- myhumanoid:TakeDamage(-.1)
- part.Transparency = size/2
- part.Size = Vector3.new(size,size,size)
- part.CFrame = swordA.STip.CFrame*CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))
- spawn(particle)
- end
- end
- spawn(tiprot)
- userinput.InputEnded:connect(function(keycode)
- local k = keycode.KeyCode
- if k == Enum.KeyCode.Z and attacking and defending then
- local partattack = chr:FindFirstChild('ATTCKZ')
- if partattack then
- defending = false
- wait(.5)
- model:Destroy()
- local model = Instance.new('Model',workspace)
- partattack:Destroy()
- damage = math.ceil(damage)
- print(damage)
- local lol = part:Clone()
- lol.Size = Vector3.new(1,500,40)
- lol.Material = Enum.Material.Neon
- lol.BrickColor = BrickColor.new(0,0,0)
- lol.CanCollide = true
- lol.Anchored = true
- lol.Transparency = 1
- local CFrameval = hrp.CFrame
- local function lerp()
- weldlerp(rightweld,.1,CFrame.new(-1.5,1.5,0)*CFrame.Angles(math.rad(180),0,0),CFrame.new(-1.5,0,0))
- end
- local function lerpB()
- weldlerp(swordweldA,.1,CFrame.new(0, 1, 0)*CFrame.Angles(0,0,0),CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0))
- end
- local function kido()
- for i = 1,40 do
- renderstepped:wait()
- local clone = lol:Clone()
- local function tran()
- for i = 1,0,-.1 do
- renderstepped:wait()
- clone.Transparency = i
- end
- end
- spawn(tran)
- clone.CFrame = CFrameval+CFrameval.lookVector*(i*40)
- local debounce = false
- clone.Touched:connect(function(p)
- if p.Parent then
- local h = p.Parent:FindFirstChild('Humanoid')
- local w = p.Parent:FindFirstChild('Weld')
- if h and h~=myhumanoid and debounce == false then
- debounce = true
- h:TakeDamage(damage)
- local bav = Instance.new("BodyAngularVelocity",h.Parent.Torso)
- bav.MaxTorque = Vector3.new(huge,huge,huge)
- bav.AngularVelocity = Vector3.new(math.random(0,180),math.random(0,180),math.random(0,180))
- local bf = Instance.new('BodyForce',h.Parent.Torso)
- local function destroy()
- wait(math.random(2,4))
- bf:Destroy()
- end
- h.Sit = true
- bf.Force = Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
- spawn(destroy)
- wait()
- debounce = false
- elseif w and w.Parent ~= chr and w.Parent.Parent ~= chr then
- w:Destroy()
- end
- end
- end)
- clone.Parent = model
- end
- end
- spawn(lerp)
- spawn(lerpB)
- spawn(kido)
- wait(.2)
- attacking = false
- defending = false
- jointclone.Parent = torso
- wait(2)
- for i = 0,1,.1 do
- renderstepped:wait()
- for n,v in pairs(model:GetChildren()) do
- v.Transparency = i
- v.CFrame = v.CFrame*CFrame.new(0,1,0)
- end
- end
- model:Destroy()
- damage = 0
- end
- end
- end)
- elseif k == Enum.KeyCode.T and not attacking and not defending then
- attacking = true
- defending = true
- --X with a sword to deflect anything
- --5.4 length
- local jointA = nil
- local jointB = nil
- local joint = torso:FindFirstChild('Right Shoulder')
- jointA = joint:Clone()
- local joint = torso:FindFirstChild('Left Shoulder')
- jointB = joint:Clone()
- local cyl = part:Clone()
- cyl.BrickColor = BrickColor.new(1,1,1)
- cyl.Anchored = true
- cyl.CanCollide = true
- cyl.Size = Vector3.new(.2,.2,.2)
- cyl.Material = Enum.Material.Neon
- cyl.Touched:connect(function(p)
- if p.Parent then
- if p.Parent ~= chr and p.Parent.Parent ~= chr and p.Name ~= 'Base' then
- p:Destroy()
- end
- end
- end)
- local cmesh = cylmesh:Clone()
- cmesh.Parent = cyl
- get_rightweld()
- rightweld.Parent = rightarm
- get_leftweld()
- leftweld.Parent = leftarm
- local function lerpA()
- --54.736, -30, -54.736
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,0),CFrame.new(-1.5,.5,.5)*CFrame.Angles(math.rad(-90),math.rad(-12),math.rad(0)))
- weldlerp(swordweldA,.05,CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0,1,0)*CFrame.Angles(math.rad(0),0,0))
- end
- local function lerpB()
- --125.264, -30, 54.736
- weldlerp(leftweld,.1,CFrame.new(1.5,0,0),CFrame.new(1.5,.5,.5)*CFrame.Angles(math.rad(-90),math.rad(12),math.rad(0)))
- weldlerp(swordweldB,.05,CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0,1,0)*CFrame.Angles(math.rad(0),0,0))
- end
- spawn(lerpA)
- spawn(lerpB)
- wait(.4)
- local function defend()
- local size = 0
- cyl.Parent = workspace
- cyl.Name = 'defnd circ'
- while renderstepped:wait() and attacking and defending do
- if size > 15 then
- size = .3
- end
- size = size+.4
- cyl.Size = Vector3.new(size,.2,size)
- cyl.Transparency = size/15
- cyl.CFrame = hrp.CFrame*CFrame.new(0,.5,0)*CFrame.Angles(math.rad(90),0,0)+(hrp.CFrame.lookVector*7.4)
- end
- end
- spawn(defend)
- userinput.InputEnded:connect(function(keycode)
- if keycode.KeyCode == Enum.KeyCode.T and attacking and defending then
- defending = false
- -- wait(.4)
- local circ = workspace:WaitForChild('defnd circ')
- local size = circ.Size.X
- for i = size,10.3,.3 do
- renderstepped:wait()
- circ.Size = Vector3.new(i,.2,i)
- circ.Transparency = i/10
- circ.CFrame = hrp.CFrame*CFrame.new(0,.5,0)*CFrame.Angles(math.rad(90),0,0)+hrp.CFrame.lookVector*7.4
- end
- circ:Destroy()
- local function lerpA()
- --54.736, -30, -54.736
- weldlerp(rightweld,.1,CFrame.new(-1.5,.5,.5)*CFrame.Angles(math.rad(-90),math.rad(-12),math.rad(0)),CFrame.new(-1.5,0,0))
- weldlerp(swordweldA,.05,CFrame.new(0,1,0)*CFrame.Angles(math.rad(0),0,0),CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0))
- end
- local function lerpB()
- --125.264, -30, 54.736
- weldlerp(leftweld,.1,CFrame.new(1.5,.5,.5)*CFrame.Angles(math.rad(-90),math.rad(12),math.rad(0)),CFrame.new(1.5,0,0))
- weldlerp(swordweldB,.05,CFrame.new(0,1,0)*CFrame.Angles(math.rad(0),0,0),CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0))
- end
- spawn(lerpA)
- spawn(lerpB)
- wait(.4)
- attacking = false
- jointA.Parent = torso
- jointB.Parent = torso
- end
- end)
- elseif k == Enum.KeyCode.Y and not attacking and not defending then
- attacking = true
- defending = true
- local tele = part:Clone()
- tele.BrickColor = BrickColor.new(1,1,1)
- tele.Size = Vector3.new(.2,.2,.2)
- tele.Material = Enum.Material.Neon
- tele.CanCollide = false
- tele.Anchored = true
- tele.Transparency = 1
- heal()
- local function teleport()
- local CFrameval = hrp.CFrame
- local clone = tele:Clone()
- clone.Touched:connect(function(p)
- if p.Parent then
- if p.Parent ~= chr and p.Parent.Parent ~= chr and p.Parent.Parent.Parent ~= chr and p.Name ~= 'Base' then
- local h = p.Parent:FindFirstChild('Humanoid')
- if not h then
- p:Destroy()
- end
- end
- end
- end)
- clone.Parent = workspace
- clone.CFrame = CFrameval
- local x = 0
- local y = 0
- local z = 0
- for i = .2,10,.25 do
- renderstepped:wait()
- x = x + math.random(1,5)
- y = y + math.random(1,5)
- z = z + math.random(1,5)
- clone.Transparency = i/10
- clone.Size = Vector3.new(i,i,i)
- clone.CFrame = CFrameval*CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))
- end
- clone:Destroy()
- end
- local function find()
- local CFrameval = hrp.CFrame
- local clone = tele:Clone()
- clone.Touched:connect(function(p)
- if p.Parent then
- if p.Parent ~= chr and p.Parent.Parent ~= chr and p.Parent.Parent.Parent ~= chr and p.Name ~= 'Base' then
- local h = p.Parent:FindFirstChild('Humanoid')
- if not h then
- p:Destroy()
- end
- end
- end
- end)
- clone.Parent = workspace
- clone.CFrame = CFrameval
- local x = 0
- local y = 0
- local z = 0
- for i = 10,.2,-.25 do
- renderstepped:wait()
- x = x + math.random(1,5)
- y = y + math.random(1,5)
- z = z + math.random(1,5)
- clone.Transparency = i/10
- clone.Size = Vector3.new(i,i,i)
- clone.CFrame = CFrameval*CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))
- end
- clone:Destroy()
- end
- while renderstepped:wait() and defending and attacking do
- spawn(teleport)
- wait(.1)
- chr:SetPrimaryPartCFrame(head.CFrame*CFrame.new(math.random(-40,40),0,math.random(-40,40)))
- spawn(find)
- end
- elseif k == Enum.KeyCode.X and not attacking and not defending then
- --when shot a parade of white bolts scatter in a circular pattern
- attacking = true
- defending = true
- local dmg = 5
- local model = Instance.new('Model',chr)
- model.Name = 'XPARTICLE'
- local joint = torso:FindFirstChild('Right Shoulder')
- local jointA = joint:Clone()
- local joint = torso:FindFirstChild('Left Shoulder')
- local jointB = joint:Clone()
- get_rightweld()
- rightweld.Parent = torso
- get_leftweld()
- leftweld.Parent = torso
- local function lerpA()
- --54.736, -30, -54.736
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,0),CFrame.new(-1.5,.5,.5)*CFrame.Angles(math.rad(-90),math.rad(-12),math.rad(0)))
- weldlerp(swordweldA,.05,CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0,1,0)*CFrame.Angles(math.rad(0),0,0))
- end
- local function lerpB()
- --125.264, -30, 54.736
- weldlerp(leftweld,.1,CFrame.new(1.5,0,0),CFrame.new(1.5,.5,.5)*CFrame.Angles(math.rad(-90),math.rad(12),math.rad(0)))
- weldlerp(swordweldB,.05,CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0,1,0)*CFrame.Angles(math.rad(0),0,0))
- end
- spawn(lerpA)
- spawn(lerpB)
- local function particles()
- local particle = part:Clone()
- particle.Material = Enum.Material.Neon
- particle.Size = Vector3.new(.2,.2,.2)
- particle.BrickColor = BrickColor.new(1,1,1)
- particle.CanCollide = false
- particle.Anchored = true
- particle.Parent = model
- local xcharge = chr:FindFirstChild('XCHARGE')
- local CFrameval = hrp.CFrame*CFrame.new(math.random(-4,4),math.random(-2,4),math.random(-20,-10))
- for i = 0,1,.05 do
- if xcharge then
- renderstepped:wait()
- particle.CFrame = CFrameval:lerp(xcharge.CFrame,i)
- particle.Transparency = i
- end
- end
- particle:Destroy()
- end
- local function charging()
- local x = 0
- local y = 0
- local z = 0
- local size = .2
- local add = true
- local charge = part:Clone()
- charge.Size = Vector3.new(.2,.2,.2)
- charge.BrickColor = BrickColor.new(1,1,1)
- charge.CanCollide = false
- charge.Anchored = true
- charge.Material = Enum.Material.Neon
- charge.Name = 'XCHARGE'
- charge.Parent = chr
- while attacking and defending and renderstepped:wait() do
- if x > 360 then
- x = 0
- elseif y > 360 then
- y = 0
- elseif z > 360 then
- z = 0
- elseif size > 2 and add then
- add = false
- elseif size < .4 and not add then
- add = true
- elseif add == true then
- size = size + .1
- elseif add == false then
- size = size - .1
- end
- x = x + 2
- y = y + 3
- z = z + 5
- dmg = dmg+math.random()/4
- charge.Size = Vector3.new(size,size,size)
- charge.Transparency = size/2
- spawn(particles)
- local CFrameval = hrp.CFrame+hrp.CFrame.lookVector*7.4
- charge.CFrame = CFrameval*CFrame.new(0,1,0)*CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))
- end
- end
- spawn(charging)
- userinput.InputEnded:connect(function(keycode)
- if keycode.KeyCode == Enum.KeyCode.X and attacking and defending then
- if rightweld.C0 ~= CFrame.new(-1.5,.5,.5)*CFrame.Angles(math.rad(-90),math.rad(-12),math.rad(0)) then
- wait(.4)
- end
- defending = false
- model:Destroy()
- local xcharge = chr:FindFirstChild('XCHARGE')
- if xcharge then
- local template = part:Clone()
- template.Size = Vector3.new(.2,.2,4)
- template.BrickColor = BrickColor.new(1,1,1)
- template.CanCollide = false
- template.Anchored = true
- template.Material = Enum.Material.Neon
- template.Name = 'XCHARGE'
- local bv = Instance.new('BodyVelocity',template)
- bv.MaxForce = Vector3.new(huge,huge,huge)
- xcharge:Destroy()
- local function lerpA()
- --54.736, -30, -54.736
- weldlerp(rightweld,.1,CFrame.new(-1.5,.5,.5)*CFrame.Angles(math.rad(-90),math.rad(-12),math.rad(0)),CFrame.new(-1.5,0,0))
- weldlerp(swordweldA,.05,CFrame.new(0,1,0)*CFrame.Angles(math.rad(0),0,0),CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0))
- end
- local function lerpB()
- --125.264, -30, 54.736
- weldlerp(leftweld,.1,CFrame.new(1.5,.5,.5)*CFrame.Angles(math.rad(-90),math.rad(12),math.rad(0)),CFrame.new(1.5,0,0))
- weldlerp(swordweldB,.05,CFrame.new(0,1,0)*CFrame.Angles(math.rad(0),0,0),CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0))
- end
- spawn(lerpA)
- spawn(lerpB)
- local function attck()
- wait(.2)
- attacking = false
- defending = false
- end
- spawn(attck)
- for i = 1,10 do
- renderstepped:wait()
- local clone = template:Clone()
- clone.CFrame = hrp.CFrame*CFrame.new(math.random(-2,2),math.random(0,4),-7.4)
- clone.BodyVelocity.Velocity = hrp.CFrame.lookVector*math.random(200,400)
- clone.Parent = workspace
- clone.Anchored = false
- clone.Touched:connect(function(p)
- if p.Parent then
- local h = p.Parent:FindFirstChild('Humanoid')
- local function bulleteffect()
- clone:Destroy()
- local sphere = part:Clone()
- sphere.BrickColor = BrickColor.new(1,1,1)
- sphere.Size = Vector3.new(.2,.2,.2)
- sphere.Anchored = true
- sphere.CanCollide = false
- sphere.Material = Enum.Material.Neon
- sphere.Shape = 'Ball'
- sphere.CFrame = clone.CFrame+clone.CFrame.lookVector*-2
- local function grow()
- local CFrameval = sphere.CFrame
- sphere.Parent = workspace
- for i = .2,5,.2 do
- renderstepped:wait()
- sphere.Transparency = i/5
- sphere.Size = Vector3.new(i,i,i)
- sphere.CFrame = CFrameval
- end
- sphere:Destroy()
- end
- spawn(grow)
- end
- if h and h~=myhumanoid then
- spawn(bulleteffect)
- bloodcframeB(math.floor(dmg+math.random(-5,5)),h.Parent.Torso,h)
- elseif not h then
- spawn(bulleteffect)
- end
- end
- end)
- end
- jointA.Parent = torso
- jointB.Parent = torso
- end
- end
- end)
- elseif k == Enum.KeyCode.U and not defending and not attacking then
- defending = true
- attacking = true
- local joint = torso:FindFirstChild('Right Shoulder')
- local jointA = joint:Clone()
- local joint = torso:FindFirstChild('Left Shoulder')
- local jointB = joint:Clone()
- get_rightweld()
- rightweld.Parent = rightarm
- get_leftweld()
- leftweld.Parent = leftarm
- --weld,speed,startpoint,endpoint,clone,clonepart,clonepartcframe,transpeed
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,0),CFrame.Angles(math.rad(-15),math.rad(30),math.rad(0))*CFrame.new(-1.5,0,0))
- end
- local function lerpB()
- weldlerp(leftweld,.1,CFrame.new(1.5,0,0),CFrame.Angles(math.rad(-15),math.rad(-30),math.rad(0))*CFrame.new(1.5,0,0))
- end
- spawn(lerpA)
- spawn(lerpB)
- local rad = 2
- local circ = 2*pi*rad
- local n = circ/.4
- local rot = 360/n
- local model = Instance.new('Model',chr)
- local template = part:Clone()
- template.Size = Vector3.new(.4,.4,.4)
- template.Material = Enum.Material.Neon
- template.BrickColor = BrickColor.new(1,1,1)
- template.Anchored = true
- template.CanCollide = false
- template.Transparency = 1
- local bv = Instance.new('BodyVelocity',template)
- bv.MaxForce = Vector3.new(huge,huge,huge)
- local CFrameval = hrp.CFrame
- myhumanoid.WalkSpeed = 0
- for i = 0,n do
- renderstepped:wait()
- local clone = template:Clone()
- local function tran()
- for i = 1,0,-.1 do
- renderstepped:wait()
- clone.Transparency = i
- end
- -- clone.Anchored = false
- wait(2)
- clone:Destroy()
- end
- spawn(tran)
- clone.Parent = model
- clone.CFrame = CFrameval*CFrame.Angles(0,math.rad(i*rot),0)*CFrame.new(0,0,2)
- bv.Velocity = clone.CFrame.lookVector*-100
- end
- local function thing()
- local cyl = part:Clone()
- cyl.Material = Enum.Material.Neon
- cyl.Size = Vector3.new(.2,200,.2)
- cyl.BrickColor = BrickColor.new(1,1,1)
- cyl.Anchored = true
- cyl.CanCollide = false
- local cylmeshp = cylmesh:Clone()
- cylmeshp.Parent = cyl
- cyl.CFrame = hrp.CFrame
- cyl.Parent = workspace
- local CFrameval = cyl.CFrame
- for i = .2,10,.2 do
- renderstepped:wait()
- cyl.Transparency = i/10
- cyl.Size = Vector3.new(i,200,i)
- cyl.CFrame = CFrameval
- end
- cyl:Destroy()
- end
- wait(.2)
- spawn(thing)
- spawn(heal)
- myhumanoid.WalkSpeed = 16
- for i,v in pairs(model:GetChildren()) do
- v.Anchored = false
- end
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.Angles(math.rad(-15),math.rad(30),math.rad(0))*CFrame.new(-1.5,0,0),CFrame.new(-1.5,0,0))
- end
- local function lerpB()
- weldlerp(leftweld,.1,CFrame.Angles(math.rad(-15),math.rad(-30),math.rad(0))*CFrame.new(1.5,0,0),CFrame.new(1.5,0,0))
- end
- spawn(lerpA)
- spawn(lerpB)
- wait(.2)
- attacking = false
- defending = false
- jointA.Parent = torso
- jointB.Parent = torso
- elseif k == Enum.KeyCode.C and not attacking and not defending then
- attacking = true
- defending = true
- --kido bleed/4 thing that anchors
- local joint = torso:FindFirstChild('Right Shoulder')
- local jointA
- if joint then
- jointA = joint:Clone()
- end
- local template = part:Clone()
- template.Material = Enum.Material.Neon
- template.BrickColor = BrickColor.new(Color3.fromRGB(41, 128, 185))
- template.Anchored = true
- template.CanCollide = false
- template.Size = Vector3.new(.2,4,.2)
- local bv = Instance.new('BodyVelocity',template)
- bv.MaxForce = Vector3.new(huge,huge,huge)
- bv.Velocity = hrp.CFrame.lookVector*400
- get_rightweld()
- rightweld.Parent = torso
- -- local ba = Instance.new('BodyAngularVelocity',template)
- -- ba.MaxTorque = Vector3.new(huge,huge,huge)
- -- ba.AngularVelocity = Vector3.new(0,0,10)
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,0),CFrame.new(-1.5,.5,.5)*CFrame.Angles(math.rad(-90),0,0))
- end
- local function lerpB()
- weldlerp(swordweldA,.1,CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0,1,0)*CFrame.Angles(math.rad(0),0,0))
- end
- spawn(lerpB)
- spawn(lerpA)
- wait(.2)
- local rad = 1
- local circ = 2*pi*rad
- local n = circ/.4
- local rot = 360/n
- for i = 0,n do
- -- renderstepped:wait()
- local clone = template:Clone()
- -- clone.BodyAngularVelocity:Destroy()
- clone.CFrame = swordA.STip.CFrame*CFrame.Angles(0,math.rad(i*rot),0)
- clone.Parent = workspace
- clone.Anchored = false
- clone.Size = Vector3.new(.4,.4,.4)
- clone.BodyVelocity.Velocity = clone.CFrame.lookVector*50
- local function destroy()
- wait(2)
- clone:Destroy()
- end
- spawn(destroy)
- end
- local clone = template:Clone()
- local debounce = false
- clone.Touched:connect(function(p)
- if p.Parent then
- local h = p.Parent:FindFirstChild('Humanoid')
- local t = p.Parent:FindFirstChild('Torso')
- if h and h~=myhumanoid and t and t~=torso then
- local function thing()
- bloodcframeB(math.random(1,5),t,h)
- end
- local function kido()
- t.Anchored = true
- while h.Health>1 and t.Anchored == true do
- spawn(thing)
- for i = 1,4 do
- renderstepped:wait()
- local clone = template:Clone()
- clone.Parent = workspace
- clone.Size = Vector3.new(1.5,.2,.2)
- clone.Transparency = 0
- local CFrameval = t.CFrame*CFrame.Angles(0,math.rad(45*i),0)
- local function tran()
- for i = .2,10.2,.2 do
- renderstepped:wait()
- clone.Transparency = i/10
- clone.Size = Vector3.new(1.5,.2,i)
- clone.CFrame = CFrameval
- end
- end
- spawn(tran)
- end
- wait(1)
- end
- end
- spawn(kido)
- elseif not h and p.Parent ~= chr and p.Parent.Parent ~=chr and p.Parent.Parent ~= chr and not debounce then
- clone.Anchored = true
- local CFrameval = clone.CFrame
- debounce = true
- clone.Size = Vector3.new(.2,.2,.2)
- local x = 0
- local y = 0
- local z = 0
- for i = .2,10,.1 do
- if clone then
- x = x+math.random(1,4)
- y = y-math.random(1,4)
- z = z+math.random(1,4)
- renderstepped:wait()
- clone.Size = Vector3.new(i,i,i)
- clone.CFrame = CFrameval*CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))
- clone.Transparency = i/10
- end
- end
- clone:Destroy()
- debounce = false
- end
- end
- end)
- clone.Parent = workspace
- clone.CFrame = swordA.STip.CFrame
- clone.BodyVelocity.Velocity = hrp.CFrame.lookVector*400
- clone.Anchored = false
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.new(-1.5,.5,.5)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(-1.5,0,0))
- end
- local function lerpB()
- weldlerp(swordweldA,.1,CFrame.new(0,1,0)*CFrame.Angles(math.rad(0),0,0),CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0))
- end
- spawn(lerpB)
- spawn(lerpA)
- wait(.2)
- attacking = false
- defending = false
- jointA.Parent = torso
- elseif k == Enum.KeyCode.V and not attacking and not defending then
- attacking = true
- defending = true
- local jointA
- local jointB
- local joint = torso:FindFirstChild('Right Shoulder')
- jointA = joint:Clone()
- joint = torso:FindFirstChild('Left Shoulder')
- jointB = joint:Clone()
- get_rightweld()
- rightweld.Parent = rightarm
- get_leftweld()
- leftweld.Parent = leftarm
- local model = Instance.new('Model',terrain)
- local grass = part:Clone()
- grass.Material = Enum.Material.Neon
- grass.Anchored = false
- grass.CanCollide = false
- -- local ba = Instance.new('BodyAngularVelocity',grass)
- -- ba.MaxTorque = Vector3.new(huge,huge,huge)
- local bp = Instance.new('BodyPosition',grass)
- bp.D = 100
- bp.MaxForce = Vector3.new(huge,huge,huge)
- bp.P = 200
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,0),CFrame.Angles(math.rad(-15),math.rad(30),math.rad(0))*CFrame.new(-1.5,0,0))
- end
- local function lerpB()
- weldlerp(leftweld,.1,CFrame.new(1.5,0,0),CFrame.Angles(math.rad(-15),math.rad(-30),math.rad(0))*CFrame.new(1.5,0,0))
- end
- spawn(lerpA)
- spawn(lerpB)
- for i = 1,math.random(100,200) do
- local color = math.random(1,2)
- local random = math.random()
- local clone = grass:Clone()
- if color == 1 then
- clone.BrickColor = BrickColor.new(1,1,1)
- else
- clone.BrickColor = BrickColor.new(0,0,0)
- end
- clone.Position = torso.Position+Vector3.new(math.random(-15,15),-10,math.random(-15,15))
- clone.Size = Vector3.new(random,random,random)
- clone.BodyPosition.Position = torso.Position+Vector3.new(math.random(-15,15),math.random(-1,15),math.random(-15,15))
- Instance.new('BodyAngularVelocity',clone)
- clone.BodyAngularVelocity.AngularVelocity = Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
- clone.Parent = model
- end
- defending = false
- for i,v in pairs(model:GetChildren()) do
- renderstepped:wait()
- local debounce = false
- v.Touched:connect(function(p)
- if p.Parent and debounce == false then
- local function destroy()
- local cframeval = v.CFrame
- for i = 0,1,.05 do
- renderstepped:wait()
- v.Transparency = i
- v.Size = v.Size+Vector3.new(.3,.3,.3)
- v.CFrame = cframeval
- end
- v:Destroy()
- end
- local weld = p.Parent:FindFirstChild('Weld',true)
- local h = p.Parent:FindFirstChild('Humanoid')
- if h and h~=myhumanoid then
- debounce = true
- bloodcframeB(math.random(5,20),h.Parent.Torso,h)
- destroy()
- elseif weld and weld ~= rightweld and weld ~= leftweld and weld.Parent.Parent ~= swordA and weld.Parent.Parent ~= swordB then
- debounce = true
- weld:Destroy()
- destroy()
- elseif p.Parent ~= model and p.Parent ~= chr and p.Parent.Parent ~= chr then
- debounce = true
- destroy()
- end
- end
- end)
- local bv = Instance.new('BodyVelocity',v)
- v.BodyPosition:Destroy()
- bv.MaxForce = Vector3.new(huge,huge,huge)
- bv.Velocity = torso.CFrame.lookVector*200
- end
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.Angles(math.rad(-15),math.rad(30),math.rad(0))*CFrame.new(-1.5,0,0),CFrame.new(-1.5,0,0))
- end
- local function lerpB()
- weldlerp(leftweld,.1,CFrame.Angles(math.rad(-15),math.rad(-30),math.rad(0))*CFrame.new(1.5,0,0),CFrame.new(1.5,0,0))
- end
- spawn(lerpA)
- spawn(lerpB)
- wait(.2)
- jointA.Parent = torso
- jointB.Parent = torso
- attacking = false
- defending = false
- elseif k == Enum.KeyCode.B and not attacking and not defending then
- --cero
- attacking = true
- defending = true
- local debounce = false
- local jointA
- local jointB
- local joint = torso:FindFirstChild('Right Shoulder')
- jointA = joint:Clone()
- joint = torso:FindFirstChild('Left Shoulder')
- jointB = joint:Clone()
- local dmg = 25
- local model = Instance.new('Model',terrain)
- get_rightweld()
- rightweld.Parent = rightarm
- get_leftweld()
- leftweld.Parent = leftarm
- local template = part:Clone()
- template.BrickColor = BrickColor.new(0,0,0)
- template.Size = Vector3.new(.2,.2,.2)
- template.CanCollide = false
- template.Anchored = true
- template.Material = Enum.Material.Neon
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,0),CFrame.Angles(math.rad(180),0,math.rad(15))*CFrame.new(-1.5,-1.5,0))
- weldlerp(swordweldA,.05,CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0,1,0)*CFrame.Angles(0,0,0))
- end
- local function lerpB()
- weldlerp(leftweld,.1,CFrame.new(1.5,0,0),CFrame.Angles(math.rad(180),0,math.rad(-15))*CFrame.new(1.5,-1.5,0))
- weldlerp(swordweldB,.05,CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0,1,0)*CFrame.Angles(0,0,0))
- end
- spawn(lerpA)
- spawn(lerpB)
- wait(.4)
- for i = 1,4 do
- wait()
- if i > 2 then
- local clone = template:Clone()
- clone.Parent = model
- local function grow()
- local randomA = math.random(-5,5)
- local randomB = math.random(-5,5)
- local randomC = math.random(-5,5)
- local x = 1
- local y = 1
- local z = 1
- local size = .1
- local adding = true
- while attacking and defending and renderstepped:wait() do
- dmg = dmg+.001
- if adding == true and size > 4 then
- adding = false
- size = size - .1
- elseif adding == false and size < .2 then
- adding = true
- size = size + .1
- elseif adding == true then
- size = size + .1
- elseif adding == false then
- size = size - .1
- end
- clone.Transparency = size/4
- x = x + randomA
- y = y - randomB
- z = z + randomC
- clone.Size = Vector3.new(size,size,size)
- clone.CFrame = CFrame.new(head.Position)*CFrame.new(0,7,0)*CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))
- end
- end
- spawn(grow)
- else
- local clone = template:Clone()
- clone.Parent = model
- clone.BrickColor = BrickColor.new(1,1,1)
- local function grow()
- local randomA = math.random(-5,5)
- local randomB = math.random(-5,5)
- local randomC = math.random(-5,5)
- local x = 1
- local y = 1
- local z = 1
- local size = .1
- local adding = true
- while attacking and defending and renderstepped:wait() do
- if adding == true and size > 4 then
- adding = false
- size = size - .1
- elseif adding == false and size < .2 then
- adding = true
- size = size + .1
- elseif adding == true then
- size = size + .1
- elseif adding == false then
- size = size - .1
- end
- clone.Transparency = size/4
- x = x + randomA
- y = y - randomB
- z = z + randomC
- clone.Size = Vector3.new(size,size,size)
- clone.CFrame = CFrame.new(head.Position)*CFrame.new(0,7,0)*CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))
- end
- end
- spawn(grow)
- end
- userinput.InputEnded:connect(function(keycode)
- local key = keycode.KeyCode
- if key == Enum.KeyCode.B and attacking and defending then
- if rightweld.C0 ~= CFrame.Angles(math.rad(180),0,math.rad(15))*CFrame.new(-1.5,-1.5,0) then
- wait(.4)
- end
- defending = false
- local CFrameval = model.Part.CFrame
- for i = model.Part.Size.X,4,.1 do
- renderstepped:wait()
- for index,v in pairs(model:GetChildren()) do
- v.Size = Vector3.new(i,i,i)
- v.CFrame = CFrameval
- v.Transparency = .5
- end
- end
- -- for i,v in pairs(model:GetChildren()) do
- -- v.Size = Vector3.new(4,4,200)
- -- v.CFrame = CFrameval
- -- v.Touched:connect(function(p)
- --
- -- end)
- -- end
- local rot = 1
- local ray = part:Clone()
- ray.Material = Enum.Material.Neon
- ray.Size = Vector3.new(4,4,200)
- ray.BrickColor = BrickColor.new(0,0,0)
- ray.Anchored = true
- ray.CanCollide = false
- ray.Transparency = 0
- ray.Touched:connect(function(p)
- if p.Parent and p.Parent.Name ~= 'Base' and p.Parent ~= chr and p.Parent.Parent ~= chr and p.Parent.Parent.Parent ~= chr then
- local h = p.Parent:FindFirstChild('Humanoid')
- local function _()
- bloodcframeB(math.ceil(dmg)+math.random(-5,5),h.Parent.Torso,h)
- end
- if h and h~=myhumanoid and debounce == false then
- debounce = true
- spawn(_)
- renderstepped:wait()
- debounce = false
- elseif debounce == false then
- p:Destroy()
- end
- end
- end)
- ray.Parent = model
- mouse.TargetFilter = model
- while ceroing == true do
- renderstepped:wait()
- for i,v in pairs(model:GetChildren()) do
- rot = rot + 2
- v.CFrame = CFrame.new(head.Position+Vector3.new(0,7,0),mouse.Hit.p)*CFrame.Angles(0,0,math.rad(rot))
- ray.CFrame = v.CFrame*CFrame.new(0,0,-100)
- end
- end
- for i = 0,1,.01 do
- renderstepped:wait()
- for index,v in pairs(model:GetChildren()) do
- v.Transparency = i
- v.CFrame = v.CFrame*CFrame.Angles(0,0,math.rad(rot))
- end
- end
- model:Destroy()
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.Angles(math.rad(180),0,math.rad(15))*CFrame.new(-1.5,-1.5,0),CFrame.new(-1.5,0,0))
- weldlerp(swordweldA,.05,CFrame.new(0,1,0)*CFrame.Angles(0,0,0),CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0))
- end
- local function lerpB()
- weldlerp(leftweld,.1,CFrame.Angles(math.rad(180),0,math.rad(-15))*CFrame.new(1.5,-1.5,0),CFrame.new(1.5,0,0))
- weldlerp(swordweldB,.05,CFrame.new(0,1,0)*CFrame.Angles(0,0,0),CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0))
- end
- spawn(lerpA)
- spawn(lerpB)
- wait(.4)
- jointA.Parent = torso
- jointB.Parent = torso
- attacking = false
- end
- end)
- end
- elseif k == Enum.KeyCode.P and not defending and not attacking then
- attacking = true
- defending = true
- local model = Instance.new('Model',terrain)
- local template = part:Clone()
- template.BrickColor = BrickColor.new('Pastel Blue')
- template.Transparency = 0
- template.Material = Enum.Material.Neon
- template.CanCollide = false
- template.Anchored = true
- template.Size = Vector3.new(1,200,1)
- local shield = template:Clone()
- shield.Anchored = true
- shield.CanCollide = true
- shield.Size = Vector3.new(87,87,87)
- shield.Shape = 'Cylinder'
- shield.Transparency = 1
- head.Anchored = true
- local rad = 20
- local circ = 2*pi*rad
- local n = circ
- local rot = 360/n
- shield.CFrame = torso.CFrame*CFrame.Angles(0,0,math.rad(90))
- shield.Touched:connect(function(p)
- if p.Parent and p.Parent ~= chr and p.Parent.Parent ~= chr and p.Parent.Parent ~= chr and p.Name ~= 'Base' then
- local h = p.Parent:FindFirstChild('Humanoid')
- if h and h~=myhumanoid then
- bloodcframeB(math.ceil(h.MaxHealth/math.random(2,10)),h.Parent.Torso,h)
- else
- p:Destroy()
- end
- end
- end)
- for i = 0,n/3 do
- local clone = template:Clone()
- clone.Touched:connect(function(p)
- if p.Parent and p.Parent ~= chr and p.Parent.Parent ~= chr and p.Parent.Parent ~= chr and p.Name ~= 'Base' then
- local h = p.Parent:FindFirstChild('Humanoid')
- if h and h~=myhumanoid then
- bloodcframeB(math.ceil(h.MaxHealth/math.random(2,10)),h.Parent.Torso,h)
- else
- p:Destroy()
- end
- end
- end)
- clone.CFrame = torso.CFrame
- clone.Parent = model
- local function grow()
- for index = 0,1,.025 do
- renderstepped:wait()
- clone.CFrame = torso.CFrame:lerp(torso.CFrame*CFrame.Angles(0,math.rad(i*rot*3),0)*CFrame.new(0,0,rad*2),index)
- end
- end
- spawn(grow)
- end
- local function waiting()
- wait(.667)
- shield.Parent = model
- end
- model.PrimaryPart = shield
- local function healing()
- wait(.667)
- model.PrimaryPart = shield
- while attacking and defending and renderstepped:wait() do
- model.PrimaryPart = shield
- myhumanoid.Health = myhumanoid.Health + math.random()/10
- model:SetPrimaryPartCFrame(shield.CFrame*CFrame.Angles(math.rad(.5),0,0))
- end
- end
- spawn(healing)
- userinput.InputEnded:connect(function(keycode)
- if keycode.KeyCode == Enum.KeyCode.P and attacking and defending then
- defending = false
- head.Anchored = false
- for i = 0,1,.1 do
- renderstepped:wait()
- for index,v in pairs(model:GetChildren()) do
- v.CanCollide = false
- v.CFrame = v.CFrame*CFrame.new(0,.2,0)
- v.Transparency = i
- end
- end
- model:Destroy()
- attacking = false
- end
- end)
- elseif k == Enum.KeyCode.N and not attacking and not defending then
- --grass that lerps to center/circ of circle with ragged rots
- attacking = true
- defending = true
- local model = Instance.new('Model',terrain)
- local target = mouse.Hit
- local jointA
- local jointB
- local joint = torso:FindFirstChild('Right Shoulder')
- jointA = joint:Clone()
- joint = torso:FindFirstChild('Left Shoulder')
- jointB = joint:Clone()
- get_rightweld()
- rightweld.Parent = rightarm
- -- get_leftweld()
- -- leftweld.Parent = leftarm
- local template = part:Clone()
- template.Material = Enum.Material.Neon
- template.CanCollide = false
- template.BrickColor = BrickColor.new(0,0,0)
- template.Anchored = false
- local grass = part:Clone()
- grass.Material = Enum.Material.Grass
- grass.BrickColor = BrickColor.Green()
- grass.CanCollide = true
- grass.Anchored = true
- grass.Size = Vector3.new(2,2,2)
- local rad = 25
- local circ = 2*pi*rad
- local n = circ/2
- local rot = 360/n
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,0),CFrame.Angles(0,0,math.rad(-45))*CFrame.new(-1.3,0,0))
- weldlerp(swordweldA,.1,CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0),CFrame.Angles(math.rad(0),0,math.rad(45))*CFrame.new(1,1.75,0))
- end
- lerpA()
- --(part,startpoint,endpoint,speed,canclone,clonepart,clonepartcframe,transpeed)
- local startpoint = torso.CFrame
- grass.Parent = terrain
- plerp(grass,startpoint*CFrame.new(2,-4,0),CFrame.new(target.p),.05,true,grass,grass.CFrame,.1)
- local grassB = grass:Clone()
- grass:Destroy()
- for i = 0,n do
- renderstepped:wait()
- local clone = grass:Clone()
- clone.Parent = model
- clone.CFrame = CFrame.new(target.p)*CFrame.Angles(0,math.rad(i*rot),0)*CFrame.new(0,0,rad)
- clone.CFrame = clone.CFrame*CFrame.Angles(math.random(-90,90),math.random(-90,90),math.random(-90,90))
- end
- defending = false
- for i = 50,math.random(60,120) do
- renderstepped:wait()
- local clone = template:Clone()
- clone.Touched:connect(function(p)
- if p.Parent then
- local h = p.Parent:FindFirstChild('Humanoid')
- local function remove()
- clone.Anchored = false
- clone.Size = Vector3.new(.2,.2,.2)
- clone.Shape = 'Ball'
- clone.Anchored = true
- clone.CFrame = clone.CFrame*CFrame.new(0,clone.Size.Y/2,0)
- for i = 0,1,.1 do
- renderstepped:wait()
- clone.Transparency = i
- clone.Size = Vector3.new(i*4,i*4,i*4)
- end
- clone:Destroy()
- end
- if h and h~=myhumanoid then
- spawn(remove)
- bloodcframeB(math.ceil(h.MaxHealth/math.random(2,10)),h.Parent.Torso,h)
- else
- spawn(remove)
- end
- end
- end)
- local function tran()
- for i = 1,0,.1 do
- renderstepped:wait()
- clone.Transparency = i
- end
- end
- local bv = Instance.new('BodyVelocity',clone)
- bv.Velocity = Vector3.new(0,math.random(-200,-100),0)
- clone.Size = Vector3.new(1,math.random(5,10),1)
- clone.CFrame = CFrame.new(target.p)*CFrame.new(math.random(-rad/2,rad/2),math.random(100,200),math.random(-rad/2,rad/2))
- spawn(tran)
- clone.Parent = terrain
- end
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.Angles(0,0,math.rad(-45))*CFrame.new(-1.3,0,0),CFrame.new(-1.5,0,0))
- weldlerp(swordweldA,.1,CFrame.Angles(math.rad(0),0,math.rad(45))*CFrame.new(1,1.75,0),CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0))
- end
- lerpA()
- jointA.Parent = torso
- attacking = false
- local function cleanup()
- wait(2)
- renderstepped:wait()
- for i = 0,1,.1 do
- renderstepped:wait()
- for x,v in pairs(model:GetChildren()) do
- v.CFrame = v.CFrame*CFrame.new(0,1,0)
- v.Transparency = i
- end
- -- v:Destroy()
- end
- model:Destroy()
- end
- spawn(cleanup)
- elseif k == Enum.KeyCode.G and not attacking then
- attacking = true
- local destroying = true
- local debounce = false
- local jointA
- local jointB
- local joint = torso:FindFirstChild('Right Shoulder')
- jointA = joint:Clone()
- joint = torso:FindFirstChild('Left Shoulder')
- jointB = joint:Clone()
- get_rightweld()
- get_leftweld()
- local function swordcolor(colorA,colorB)
- for i = 1,2 do
- local function colorchange(part)
- if i == 1 then
- part.BrickColor = colorA
- else
- part.BrickColor = colorB
- end
- end
- if i == 1 then
- for i,v in pairs(swordA:GetChildren()) do
- colorchange(v)
- end
- else
- for i,v in pairs(swordB:GetChildren()) do
- colorchange(v)
- end
- end
- end
- end
- local function leedle()
- swordcolor(BrickColor.new(Color3.fromRGB(192, 57, 43)),BrickColor.new(Color3.fromRGB(192, 57, 43)))
- end
- leedle()
- rightweld.Parent = rightarm
- leftweld.Parent = leftarm
- local function destroy(p)
- if p.Parent and destroying then
- local h = p.Parent:FindFirstChild('Humanoid')
- if not h and p.Parent ~= chr and p.Parent.Parent ~= chr and p.Parent.Parent.Parent ~= chr and p.Parent~=swordA and p.Parent~=swordB and p.Parent.Name ~= 'Base' and not p:FindFirstChild('BillboardGui') then
- p:Destroy()
- elseif h and debounce == false and h~=myhumanoid then
- debounce = true
- bloodcframeB(math.ceil(h.MaxHealth/math.random(2,10)),h.Parent.Torso,h)
- end
- end
- end
- swordA.HitBox.Touched:connect(function(p)
- destroy(p)
- end)
- swordB.HitBox.Touched:connect(function(p)
- destroy(p)
- end)
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,0),CFrame.Angles(math.rad(-90),0,math.rad(-45))*CFrame.new(-1.5,-.5,.5))
- end
- spawn(lerpA)
- weldlerp(leftweld,.1,CFrame.new(1.5,0,0),CFrame.Angles(math.rad(-90),0,math.rad(45))*CFrame.new(1.5,-.5,1))
- local function lerpA()
- weldlerp(rightweld,.15,CFrame.Angles(math.rad(-90),0,math.rad(-45))*CFrame.new(-1.5,-.5,.5),CFrame.Angles(0,0,math.rad(-30))*CFrame.new(-1.5,0,0))
- end
- spawn(lerpA)
- weldlerp(leftweld,.15,CFrame.Angles(math.rad(-90),0,math.rad(45))*CFrame.new(1.5,-.5,1),CFrame.Angles(0,0,math.rad(30))*CFrame.new(1.5,0,0))
- local function lerpA()
- weldlerp(rightweld,.1,CFrame.Angles(0,0,math.rad(-30))*CFrame.new(-1.5,0,0),CFrame.new(-1.5,0,0))
- end
- spawn(lerpA)
- weldlerp(leftweld,.1,CFrame.Angles(0,0,math.rad(30))*CFrame.new(1.5,0,0),CFrame.new(1.5,0,0))
- local function ledle()
- swordcolor(BrickColor.new(0,0,0),BrickColor.new(1,1,1))
- end
- spawn(ledle)
- jointA.Parent = torso
- jointB.Parent = torso
- destroying = false
- attacking = false
- elseif k == Enum.KeyCode.H and not attacking then
- attacking = true
- local debounce = false
- local poisoning = true
- local jointA
- local joint = torso:FindFirstChild('Right Shoulder')
- jointA = joint:Clone()
- get_rightweld()
- local function poison(p)
- if p.Parent and poisoning then
- local h = p.Parent:FindFirstChild('Humanoid')
- if h and debounce == false and h~=myhumanoid then
- debounce = true
- for i = 1,math.random(5,10) do
- wait(math.random())
- bloodcframeB(math.ceil(h.MaxHealth/math.random(5,50)),h.Parent.Torso,h)
- end
- end
- end
- end
- swordA.HitBox.Touched:connect(function(p)
- poison(p)
- end)
- rightweld.Parent = rightarm
- --(weld,speed,startpoint,endpoint,clone,clonepart,clonepartcframe,transpeed)
- weldlerp(rightweld,.1,CFrame.new(-1.5,0,0),CFrame.Angles(math.rad(-90),0,math.rad(45))*CFrame.new(-1.5,-.5,.5))
- weldlerp(rightweld,.1,CFrame.Angles(math.rad(-90),0,math.rad(45))*CFrame.new(-1.5,-.5,.5),CFrame.Angles(math.rad(-20),math.rad(0),math.rad(45))*CFrame.new(-1,0,.5))
- weldlerp(rightweld,.1,CFrame.Angles(math.rad(-20),math.rad(0),math.rad(45))*CFrame.new(-1,0,.5),CFrame.new(-1.5,0,0))
- jointA.Parent = torso
- attacking = false
- poisoning = false
- elseif k == Enum.KeyCode.LeftControl then
- ceroing = true
- end
- end
- end)
- --
- userinput.InputEnded:connect(function(keycode)
- local k = keycode.KeyCode
- if k == Enum.KeyCode.R and attacking and defending and not typing then
- local model = terrain:FindFirstChild('Circle')
- if model then
- defending = false
- torso.Anchored = false
- for i = 0,1,.01 do
- renderstepped:wait()
- for index,v in pairs(model:GetChildren()) do
- v.Transparency = i
- end
- end
- attacking = false
- model:Destroy()
- end
- elseif k == Enum.KeyCode.Y and attacking and defending and not typing then
- attacking = false
- defending = false
- elseif k == Enum.KeyCode.LeftControl then
- ceroing = false
- end
- end)
- --weldlerp(rightweld,.1,CFrame.new(-1.5,0,0),CFrame.Angles(math.rad(-90),0,math.rad(45))*CFrame.new(-1.5,-.5,.5))
- -- get_rightweld()
- -- rightweld.Parent = rightarm
- -- get_leftweld()
- -- leftweld.Parent = leftarm
- -- local function lerpA()
- -- weldlerp(rightweld,.05,CFrame.new(-1.5,0,0),CFrame.new(-1.5,0,-.5)*CFrame.Angles(math.rad(30),0,0),false)
- -- end
- -- local function lerpB()
- -- weldlerp(leftweld,.05,CFrame.new(1.5,0,0),CFrame.new(1.5,0,-.5)*CFrame.Angles(math.rad(30),0,0),false)
- -- end
- -- spawn(lerpA)
- -- spawn(lerpB)
- -- wait(.4)
- -- local function lerpA()
- -- weldlerp(rightweld,.1,CFrame.new(-1.5,0,-.5)*CFrame.Angles(math.rad(30),0,0),CFrame.new(-1.5,.5,.5)*CFrame.Angles(math.rad(-90),0,0),false)
- -- end
- -- local function lerpB()
- -- weldlerp(leftweld,.1,CFrame.new(1.5,0,-.5)*CFrame.Angles(math.rad(30),0,0),CFrame.new(1.5,.5,.5)*CFrame.Angles(math.rad(-90),0,0),false)
- -- end
- -- spawn(lerpA)
- -- spawn(lerpB)
- -- wait(.2)
- -- local function lerpA()
- -- weldlerp(swordweldA,.05,CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0,1,1)*CFrame.Angles(math.rad(90),0,0),false)
- -- end
- -- local function lerpB()
- -- weldlerp(swordweldB,.05,CFrame.new(0, 0, -1)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0,1,1)*CFrame.Angles(math.rad(90),0,0),false)
- -- end
- -- spawn(lerpA)
- -- spawn(lerpB)
- -- local function lerpA()
- -- weldlerp(rightweld,.05,CFrame.new(-1.5,.5,.5)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(-1.5,0,.5)*CFrame.Angles(math.rad(-30),0,0),false)
- -- end
- -- local function lerpB()
- -- weldlerp(leftweld,.05,CFrame.new(1.5,.5,.5)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(1.5,0,.5)*CFrame.Angles(math.rad(-30),0,0),false)
- -- end
- -- spawn(lerpA)
- -- spawn(lerpB)
Advertisement
Add Comment
Please, Sign In to add comment