Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------
- -- Sans Script --
- ---------------------------
- local sword = Instance.new("Tool")
- sword.Name = "Blue Sword"
- sword.Parent = game.Players.LocalPlayer.Backpack
- local hand = Instance.new("Part")
- hand.CFrame = CFrame.new(-12, 0.4, -39.5)
- hand.Anchored = false
- hand.Size = Vector3.new(1, 0.8, 4)
- hand.Parent = sword
- local sm = Instance.new("SpecialMesh")
- sm.MeshId = "rbxasset://fonts/sword.mesh"
- sm.TextureId = "rbxasset://textures/SwordTexture.png"
- sm.Parent = hand
- local so = Instance.new("Sound")
- so.Name = "Sound"
- so.SoundId = "rbxasset://sounds/swordslash.wav"
- so.Parent = hand
- local stw = Instance.new("Sound")
- stw.Name = "Sound"
- stw.SoundId = "rbxasset://sounds/swordlunge.wav"
- stw.Parent = hand
- local sth = Instance.new("Sound")
- sth.Name = "Sound"
- sth.SoundId = "rbxasset://sounds/unsheath.wav"
- sth.Parent = hand
- r = game:service("RunService")
- local damage = 5
- local slash_damage = 10
- local lunge_damage = 30
- sword = sword.Handle
- Tool = sword
- local SlashSound = Instance.new("Sound")
- SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
- SlashSound.Parent = sword
- SlashSound.Volume = .7
- local LungeSound = Instance.new("Sound")
- LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav"
- LungeSound.Parent = sword
- LungeSound.Volume = .6
- local UnsheathSound = Instance.new("Sound")
- UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
- UnsheathSound.Parent = sword
- UnsheathSound.Volume = 1
- function blow(hit)
- if (hit.Parent == nil) then return end -- happens when bullet hits sword
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
- if humanoid~=nil and humanoid ~= hum and hum ~= nil then
- -- final check, make sure sword is in-hand
- local right_arm = vCharacter:FindFirstChild("Right Arm")
- if (right_arm ~= nil) then
- local joint = right_arm:FindFirstChild("RightGrip")
- if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
- tagHumanoid(humanoid, vPlayer)
- humanoid:TakeDamage(damage)
- wait(1)
- untagHumanoid(humanoid)
- end
- end
- end
- end
- function tagHumanoid(humanoid, player)
- local creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = player
- creator_tag.Name = "creator"
- creator_tag.Parent = humanoid
- end
- function untagHumanoid(humanoid)
- if humanoid ~= nil then
- local tag = humanoid:findFirstChild("creator")
- if tag ~= nil then
- tag.Parent = nil
- end
- end
- end
- function attack()
- damage = slash_damage
- SlashSound:play()
- local anim = Instance.new("StringValue")
- anim.Name = "toolanim"
- anim.Value = "Slash"
- anim.Parent = Tool
- end
- function lunge()
- damage = lunge_damage
- LungeSound:play()
- local anim = Instance.new("StringValue")
- anim.Name = "toolanim"
- anim.Value = "Lunge"
- anim.Parent = Tool
- force = Instance.new("BodyVelocity")
- force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80
- force.Parent = Tool.Parent.Torso
- wait(.25)
- swordOut()
- wait(.25)
- force.Parent = nil
- wait(.5)
- swordUp()
- damage = slash_damage
- end
- function swordUp()
- Tool.GripForward = Vector3.new(-1,0,0)
- Tool.GripRight = Vector3.new(0,1,0)
- Tool.GripUp = Vector3.new(0,0,1)
- end
- function swordOut()
- Tool.GripForward = Vector3.new(0,0,1)
- Tool.GripRight = Vector3.new(0,-1,0)
- Tool.GripUp = Vector3.new(-1,0,0)
- end
- function swordAcross()
- -- parry
- end
- Tool.Enabled = true
- local last_attack = 0
- function onActivated()
- if not Tool.Enabled then
- return
- end
- Tool.Enabled = false
- local character = Tool.Parent;
- local humanoid = character.Humanoid
- if humanoid == nil then
- print("Humanoid not found")
- return
- end
- t = r.Stepped:wait()
- if (t - last_attack < .2) then
- lunge()
- else
- attack()
- end
- last_attack = t
- --wait(.5)
- Tool.Enabled = true
- end
- function onEquipped()
- UnsheathSound:play()
- end
- script.Parent.Activated:connect(onActivated)
- script.Parent.Equipped:connect(onEquipped)
- connection = sword.Touched:connect(blow)
- local decal = Instance.new("Decal")
- decal.Texture = "http://www.roblox.com/asset/?id=78168991"
- decal.Parent = hand
- local tint = Instance.new("TouchInterest")
- tint.Parent = hand
- local weld = Instance.new("ManualWeld")
- weld.Name = "Handle-to-Handle Strong Joint"
- weld.Part0 = hand
- weld.Archivable = true
- local Tool = script.Parent;
- enabled = true
- function onButton1Down(mouse)
- if not enabled then
- return
- end
- enabled = false
- mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
- wait(.5)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- enabled = true
- end
- function onEquippedLocal(mouse)
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- end
- Tool.Equipped:connect(onEquippedLocal)
- local d = game.Players.LocalPlayer.Character:GetChildren()
- for i=1, #d do
- if (d[i].className == "Accessory") then
- d[i]:remove()
- end
- end
- local badtime = "http://www.roblox.com/asset/?id=416805592"
- local bedtime = game.Players.LocalPlayer.Character.Head.face
- bedtime.Texture = badtime
- -- son get to bed
- -- son says mum u gonna have bad time
- local head = game.Players.LocalPlayer.Character.Head
- local torso = game.Players.LocalPlayer.Character.Torso
- local leftarm = game.Players.LocalPlayer.Character['Left Arm']
- local rightarm = game.Players.LocalPlayer.Character['Right Arm']
- local leftleg = game.Players.LocalPlayer.Character['Left Leg']
- local rightleg = game.Players.LocalPlayer.Character['Right Leg']
- head.BrickColor = BrickColor.new("Institutional white")
- torso.BrickColor = BrickColor.new("Institutional white")
- leftarm.BrickColor = BrickColor.new("Institutional white")
- rightarm.BrickColor = BrickColor.new("Institutional white")
- leftleg.BrickColor = BrickColor.new("Institutional white")
- rightleg.BrickColor = BrickColor.new("Institutional white")
- local spd = "http://www.roblox.com/asset/?id=315964941"
- local ssd = "http://www.roblox.com/asset/?id=383810694"
- local shirt = Instance.new("Shirt")
- local pants = Instance.new("Pants")
- shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=383810694"
- pants.PantsTemplate = "http://www.roblox.com/asset/?id=315964941"
- shirt.Parent = game.Players.LocalPlayer.Character
- pants.Parent = game.Players.LocalPlayer.Character
- local fast = game.Players.LocalPlayer.Character.Humanoid
- fast.WalkSpeed = "32"
- fast.JumpPower = "123"
- local me = game.Workspace[game.Players.LocalPlayer.Name]
- me.Name = "*"
- wait(1)
- me.Name = "**"
- wait(1)
- me.Name = "** "
- wait(1)
- me.Name = "** S"
- wait(1)
- me.Name = "** Sc"
- wait(1)
- me.Name = "** Scr"
- wait(1)
- me.Name = "** Scri"
- wait(1)
- me.Name = "** Scrip"
- wait(1)
- me.Name = "** Script"
- wait(1)
- me.Name = "** Script "
- wait(1)
- me.Name = "** Script C"
- wait(1)
- me.Name = "** Script Cr"
- wait(1)
- me.Name = "** Script Cre"
- wait(1)
- me.Name = "** Script Crea"
- wait(1)
- me.Name = "** Script Creat"
- wait(1)
- me.Name = "** Script Create"
- wait(1)
- me.Name = "** Script Create"
- wait(1)
- me.Name = "** Script Created"
- wait(1)
- me.Name = "** Script Created "
- wait(1)
- me.Name = "** Script Created B"
- wait(1)
- me.Name = "** Script Created By"
- wait(1)
- me.Name = "** Script Created By "
- wait(1)
- me.Name = "** Script Created By P"
- wait(1)
- me.Name = "** Script Created By PE"
- wait(1)
- me.Name = "** Script Created By PEN"
- wait(1)
- me.Name = "** Script Created By PENb"
- wait(1)
- me.Name = "** Script Created By PENbI"
- wait(1)
- me.Name = "** Script Created By PENbIS"
- wait(1)
- me.Name = "** Script Created By PENbIS_"
- wait(1)
- me.Name = "** Script Created By PENbIS_1"
- wait(1)
- me.Name = "** Script Created By PENbIS_1 "
- wait(1)
- me.Name = "** Script Created By PENbIS_1 *"
- wait(1)
- me.Name = "** Script Created By PENbIS_1 **"
- --kthxbye
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement