Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plr = owner
- char = plr.Character
- tors = char.Torso
- ra = char["Right Arm"]
- la = char["Left Arm"]
- rl = char["Right Leg"]
- ll = char["Left Leg"]
- hed = char.Head
- root = char.HumanoidRootPart
- hum = char.Humanoid
- clerp = function(toclerp, cf, number)
- local joint = toclerp
- joint.C0 = joint.C0:Lerp(cf, number)
- end
- clerp2 = function(toclerp, cf)
- local joint = toclerp
- joint.C0 = cf
- end
- clerp3 = function(toclerp, cf, number)
- local joint = toclerp
- joint.C1 = joint.C1:Lerp(cf, number)
- end
- Swait,swait = function(number)
- if number == 0 or number == nil then
- game:GetService("RunService").Heartbeat:Wait()
- else
- for i = 1,number do
- game:GetService("RunService").Heartbeat:Wait()
- end
- end
- end
- ezweld = function(p, a, b, cf)
- local weld = Instance.new("Weld",p)
- weld.Part0 = a
- weld.Part1 = b
- weld.C0 = cf
- return weld
- end
- NewSound = function(p, id, pit, vol, loop)
- local Sound = Instance.new("Sound",p)
- Sound.Pitch = pit
- Sound.Volume = vol
- Sound.SoundId = "rbxassetid://" ..id
- Sound.Looped = loop
- Sound:Play()
- return Sound
- end
- IT = Instance.new
- Rad = math.rad
- Cos = math.cos
- Sin = math.sin
- BrickC = BrickColor.new
- C3 = Color3.new
- VT = Vector3.new
- anim = "Idle"
- attack = false
- local RS = char.Torso["Right Shoulder"]
- local LS = char.Torso["Left Shoulder"]
- local RH = char.Torso["Right Hip"]
- local LH = char.Torso["Left Hip"]
- local neck = char.Torso["Neck"]
- local anim = "Idle"
- local animate = char.Animate
- local root = char.HumanoidRootPart
- local rootj = root.RootJoint
- local timepos = 0
- local sine = 0
- local RSnor = RS.C0
- local LSnor = LS.C0
- local RHnor = RH.C0
- local LHnor = LH.C0
- local RSnor2 = RS.C1
- local LSnor2 = LS.C1
- local RHnor2 = RH.C1
- local LHnor2 = LH.C1
- local rootjnor = rootj.C0
- local necknor = neck.C0
- local tors = char.Torso
- mouse = plr:GetMouse()
- hold = false
- Debris = game:GetService("Debris")
- attack = false
- lunge = false
- local tool = Instance.new("Tool", plr.Backpack)
- tool.Name = "osrwd"
- tool.GripForward = VT(-1, 0, 0)
- tool.GripPos = VT(0, 0, -1.5)
- tool.GripRight = VT(0, 1, 0)
- tool.GripUp = VT(0, 0, 1)
- local handle = Instance.new("Part", tool)
- handle.Size = Vector3.new(1, 0.8, 4)
- handle.CanCollide = false
- handle.Name = "Handle"
- local mesh = Instance.new("SpecialMesh", handle)
- mesh.MeshId = "rbxasset://fonts/sword.mesh"
- mesh.TextureId = "rbxassetid://323591032"
- nl = false
- Grips = {
- Up = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0),
- Out = CFrame.new(0, 0, -1.70000005, 0, 1, 0, 1, -0, 0, 0, 0, -1)
- }
- function thread(f)
- return coroutine.resume(coroutine.create(f))
- end
- function damage(model, dmg, bl, cf, vel)
- for i,v in pairs (model:children()) do
- if model ~= char and model ~= workspace then
- if v:IsA("Humanoid") then
- v.Health = v.Health - dmg
- if bl == true then
- local ball = Instance.new("Part", script)
- ball.CanCollide = false
- ball.Color = Color3.new(1, 0, 0)
- ball.Material = "Glass"
- ball.Size = Vector3.new(2, 2, 2)
- ball.CFrame = cf
- ball.Anchored = false
- ball.Velocity = Vector3.new(math.random(-vel, vel), math.random(-vel, vel), math.random(-vel, vel))
- local mesh = Instance.new("SpecialMesh", ball)
- mesh.MeshType = "Sphere"
- ball.Touched:connect(function(hit)
- if hit.CanCollide == true and hit.Anchored == true and bl == true then
- ball.Position = Vector3.new(ball.Position.x, hit.Position.y, ball.Position.z) + Vector3.new(0, hit.Size.y / 2, 0)
- ball.Size = Vector3.new(2, 0.01, 2)
- ball.Anchored = true
- ball.Orientation = Vector3.new(0, 0, 0)
- thread(function()
- for i = 1,20 do
- Swait()
- ball.Size = ball.Size:lerp(Vector3.new(4, 0.01, 4), 0.075)
- ball.Transparency = ball.Transparency + 0.03
- end
- ball:remove()
- end)
- end
- end)
- end
- end
- end
- end
- end
- function bled(cf, vel)
- local ball = Instance.new("Part", script)
- ball.CanCollide = false
- ball.Color = Color3.new(1, 0, 0)
- ball.Material = "Glass"
- ball.Size = Vector3.new(2, 2, 2)
- ball.CFrame = cf
- ball.Anchored = false
- ball.Velocity = Vector3.new(math.random(-vel, vel), math.random(-vel, vel), math.random(-vel, vel))
- local mesh = Instance.new("SpecialMesh", ball)
- mesh.MeshType = "Sphere"
- ball.Touched:connect(function(hit)
- if hit.CanCollide == true and hit.Anchored == true then
- ball.Position = Vector3.new(ball.Position.x, hit.Position.y, ball.Position.z) + Vector3.new(0, hit.Size.y / 2, 0)
- ball.Size = Vector3.new(2, 0.01, 2)
- ball.Anchored = true
- ball.Orientation = Vector3.new(0, 0, 0)
- thread(function()
- for i = 1,20 do
- Swait()
- ball.Size = ball.Size:lerp(Vector3.new(4, 0.01, 4), 0.075)
- ball.Transparency = ball.Transparency + 0.03
- end
- ball:remove()
- end)
- end
- end)
- end
- function slash()
- tool.Grip = Grips.Up
- attack = true
- nl = true
- thread(function()
- wait(0.3)
- nl = false
- end)
- local hitbox = handle.Touched:connect(function(hit)
- local dud = hit.Parent
- if dud ~= char then
- if not dud:FindFirstChild"cool" then
- damage(dud, 15, true, hit.CFrame, 60)
- for i = 1,5 do
- bled(hit.CFrame, 60)
- end
- local cool = Instance.new("NumberValue", dud) cool.Name = "cool" Debris:AddItem(cool, 0.15)
- end
- end
- end)
- for i = 1,17 do
- Swait()
- if lunge == false then
- clerp(RS, RSnor * CFrame.Angles(0, 0, Rad(-90)), 0.35)
- end
- end
- hitbox:disconnect()
- attack = false
- end
- function lungi()
- tool.Grip = Grips.Out
- attack = true
- lunge = true
- local hitbox = handle.Touched:connect(function(hit)
- local dud = hit.Parent
- if dud ~= char then
- if not dud:FindFirstChild"cool" then
- damage(dud, 30, true, hit.CFrame, 60)
- for i = 1,3 do
- bled(hit.CFrame, 60)
- end
- local cool = Instance.new("NumberValue", dud) cool.Name = "cool" Debris:AddItem(cool, 0.15)
- end
- end
- end)
- for i = 1,30 do
- Swait()
- if lunge == true then
- clerp(RS, RSnor * CFrame.Angles(0, 0, Rad(0)), 0.35)
- end
- end
- hitbox:disconnect()
- lunge = false
- attack = false
- tool.Grip = Grips.Up
- end
- tool.Activated:connect(function()
- if attack == false and lunge == false then
- slash()
- elseif attack == true and lunge == false and nl == true then
- lungi()
- end
- end)
- while true do
- Swait()
- if attack == false then
- clerp(RS, RSnor, 0.35)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement