Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Sound3 = Instance.new("Sound")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- Sparkles6 = Instance.new("Sparkles")
- Sparkles7 = Instance.new("Sparkles")
- SpotLight8 = Instance.new("SpotLight")
- SpotLight9 = Instance.new("SpotLight")
- Script10 = Instance.new("Script")
- LocalScript11 = Instance.new("LocalScript")
- Tool0.Name = "EpicKatana"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset/?id=25265469"
- Tool0.GripForward = Vector3.new(-1, -0, -0)
- Tool0.GripPos = Vector3.new(0, 0, -1.70000005)
- Tool0.GripRight = Vector3.new(0, 1, 0)
- Tool0.GripUp = Vector3.new(0, 0, 1)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.BrickColor = BrickColor.new("Dark stone grey")
- Part1.Rotation = Vector3.new(-48.3999977, 18.9499989, 110.119995)
- Part1.Locked = true
- Part1.FormFactor = Enum.FormFactor.Custom
- Part1.Size = Vector3.new(1, 0.800000012, 5)
- Part1.CFrame = CFrame.new(-0.0445830002, 16.590107, 0.405761003, -0.32535699, -0.888061285, 0.324792504, 0.706910312, -0.000305632973, 0.707303107, -0.628029346, 0.459725142, 0.627879083)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part1.Position = Vector3.new(-0.0445830002, 16.590107, 0.405761003)
- Part1.Orientation = Vector3.new(-45.0200005, 27.3499985, 90.0199966)
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=11442510"
- SpecialMesh2.Scale = Vector3.new(1.70000005, 1.70000005, 1.70000005)
- SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=11442524"
- SpecialMesh2.VertexColor = Vector3.new(0, 0, 0)
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- SpecialMesh2.Scale = Vector3.new(1.70000005, 1.70000005, 1.70000005)
- Sound3.Name = "SwordLunge"
- Sound3.Parent = Part1
- Sound3.SoundId = "http://www.roblox.com/asset/?id=25256253"
- Sound3.Volume = 0.80000001192093
- Sound4.Name = "SwordSlash"
- Sound4.Parent = Part1
- Sound4.SoundId = "http://www.roblox.com/asset/?id=12222216"
- Sound4.Volume = 0.69999998807907
- Sound5.Name = "Unsheath"
- Sound5.Parent = Part1
- Sound5.SoundId = "http://www.roblox.com/asset/?id=12222225"
- Sound5.Volume = 1
- Sparkles6.Name = "Sparkles1"
- Sparkles6.Parent = Part1
- Sparkles6.Color = Color3.new(-5.3125, -40.8, 6)
- Sparkles6.SparkleColor = Color3.new(-3, -4, 6)
- Sparkles6.Color = Color3.new(-5.3125, -40.8, 6)
- Sparkles7.Name = "Sparkles2"
- Sparkles7.Parent = Part1
- Sparkles7.Color = Color3.new(7.08333, -10.2, 5)
- Sparkles7.SparkleColor = Color3.new(4, -1, 5)
- Sparkles7.Color = Color3.new(7.08333, -10.2, 5)
- SpotLight8.Name = "Light1"
- SpotLight8.Parent = Part1
- SpotLight8.Color = Color3.new(-3, -4, 6)
- SpotLight8.Brightness = 6
- SpotLight8.Range = 6
- SpotLight8.Angle = 180
- SpotLight8.Face = Enum.NormalId.Top
- SpotLight8.Color = Color3.new(-3, -4, 6)
- SpotLight9.Name = "Light2"
- SpotLight9.Parent = Part1
- SpotLight9.Color = Color3.new(4, -1, 5)
- SpotLight9.Brightness = 6
- SpotLight9.Range = 6
- SpotLight9.Angle = 180
- SpotLight9.Face = Enum.NormalId.Bottom
- SpotLight9.Color = Color3.new(4, -1, 5)
- Script10.Name = "SwordScript"
- Script10.Parent = Tool0
- table.insert(cors,sandbox(Script10,function()
- --Rescripted by Luckymaxer
- Tool = script.Parent
- Handle = Tool:WaitForChild("Handle")
- Sparkles1 = Handle:WaitForChild("Sparkles1")
- Sparkles2 = Handle:WaitForChild("Sparkles2")
- Light1 = Handle:WaitForChild("Light1")
- Light2 = Handle:WaitForChild("Light2")
- Players = game:GetService("Players")
- Debris = game:GetService("Debris")
- RunService = game:GetService("RunService")
- DamageValues = {
- BaseDamage = 15,
- SlashDamage = 30,
- LungeDamage = 42
- }
- NormalSpeed = 16
- RegularSpeed = (NormalSpeed + 2)
- Damage = DamageValues.BaseDamage
- 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)
- }
- Sounds = {
- Slash = Handle:WaitForChild("SwordSlash"),
- Lunge = Handle:WaitForChild("SwordLunge"),
- Unsheath = Handle:WaitForChild("Unsheath")
- }
- ToolEquipped = false
- Tool.Grip = Grips.Up
- Tool.Enabled = true
- function IsTeamMate(Player1, Player2)
- return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
- end
- function TagHumanoid(humanoid, player)
- local Creator_Tag = Instance.new("ObjectValue")
- Creator_Tag.Name = "creator"
- Creator_Tag.Value = player
- Debris:AddItem(Creator_Tag, 2)
- Creator_Tag.Parent = humanoid
- end
- function UntagHumanoid(humanoid)
- for i, v in pairs(humanoid:GetChildren()) do
- if v:IsA("ObjectValue") and v.Name == "creator" then
- v:Destroy()
- end
- end
- end
- function Blow(Hit)
- if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped then
- return
- end
- local RightArm = Character:FindFirstChild("Right Arm")
- if not RightArm then
- return
- end
- local RightGrip = RightArm:FindFirstChild("RightGrip")
- if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then
- return
- end
- local character = Hit.Parent
- if character == Character then
- return
- end
- local humanoid = character:FindFirstChild("Humanoid")
- if not humanoid or humanoid.Health == 0 then
- return
- end
- local player = Players:GetPlayerFromCharacter(character)
- if player and (player == Player or IsTeamMate(Player, player)) then
- return
- end
- UntagHumanoid(humanoid)
- TagHumanoid(humanoid, Player)
- humanoid:TakeDamage(Damage)
- end
- function Attack()
- Damage = DamageValues.SlashDamage
- Sounds.Slash:Play()
- local Anim = Instance.new("StringValue")
- Anim.Name = "toolanim"
- Anim.Value = "Slash"
- Anim.Parent = Tool
- end
- function Lunge()
- Damage = DamageValues.LungeDamage
- Sounds.Lunge:Play()
- if ToolUnequipped then
- ToolUnequipped:disconnect()
- end
- local CurrentlyEquipped = true
- ToolUnequipped = Tool.Unequipped:connect(function()
- CurrentlyEquipped = false
- end)
- local Anim = Instance.new("StringValue")
- Anim.Name = "toolanim"
- Anim.Value = "Lunge"
- Anim.Parent = Tool
- if CheckIfAlive() then
- Humanoid.WalkSpeed = (NormalSpeed + 100)
- local Force = Instance.new("BodyVelocity")
- Force.velocity = Vector3.new(0, 10, 0)
- Force.maxForce = Vector3.new(0, 4000, 0)
- Debris:AddItem(Force, 0.4)
- Force.Parent = Torso
- end
- wait(0.2)
- Tool.Grip = Grips.Out
- wait(0.6)
- Tool.Grip = Grips.Up
- if ToolUnequipped then
- ToolUnequipped:disconnect()
- end
- if CurrentlyEquipped and CheckIfAlive() then
- Humanoid.WalkSpeed = RegularSpeed
- end
- Damage = DamageValues.SlashDamage
- end
- Tool.Enabled = true
- LastAttack = 0
- function Activated()
- if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then
- return
- end
- Tool.Enabled = false
- Tick = RunService.Stepped:wait()
- if (Tick - LastAttack < 0.2) then
- Lunge()
- else
- Attack()
- end
- LastAttack = Tick
- --wait(0.5)
- Tool.Enabled = true
- end
- function CheckIfAlive()
- return (((Player and Player.Parent and Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent) and true) or false)
- end
- function Equipped()
- Character = Tool.Parent
- Player = Players:GetPlayerFromCharacter(Character)
- Humanoid = Character:FindFirstChild("Humanoid")
- Torso = Character:FindFirstChild("Torso")
- if not CheckIfAlive() then
- return
- end
- ToolEquipped = true
- Humanoid.WalkSpeed = RegularSpeed
- Sounds.Unsheath:Play()
- end
- function Unequipped()
- Tool.Grip = Grips.Up
- if CheckIfAlive() then
- Humanoid.WalkSpeed = NormalSpeed
- end
- ToolEquipped = false
- end
- Tool.Activated:connect(Activated)
- Tool.Equipped:connect(Equipped)
- Tool.Unequipped:connect(Unequipped)
- Connection = Handle.Touched:connect(Blow)
- function SetSparkles(Table)
- for i, v in pairs(Table) do
- if v and v.Sparkles and v.Sparkles.Parent then
- local SparkleColor = ((v.Sparkles == Sparkles1 and (((v.Color and v.Color) or Color3.new(math.random(-5, 5), math.random(-10, 12), math.random(0, 15)))) or (v.Sparkles == Sparkles2 and ((v.Color and v.Color) or Color3.new(math.random(-21, 12), math.random(-2, 3), math.random(-20, 15))))))
- v.Sparkles.SparkleColor = SparkleColor
- if v.Light and v.Light.Parent then
- v.Light.Color = SparkleColor
- end
- end
- end
- end
- Spawn(function()
- SetSparkles({{Sparkles = Sparkles1, Light = Light1, Color = Color3.new(1, 1, 1)}, {Sparkles = Sparkles2, Light = Light2, Color = Color3.new(1, 0, 1)}})
- while true do
- wait(3)
- SetSparkles({{Sparkles = Sparkles1, Light = Light1}, {Sparkles = Sparkles2, Light = Light2}})
- end
- end)
- end))
- LocalScript11.Name = "MouseIcon"
- LocalScript11.Parent = Tool0
- table.insert(cors,sandbox(LocalScript11,function()
- --Made by Luckymaxer
- Mouse_Icon = "rbxasset://textures/GunCursor.png"
- Reloading_Icon = "rbxasset://textures/GunWaitCursor.png"
- Tool = script.Parent
- Mouse = nil
- function UpdateIcon()
- if Mouse then
- Mouse.Icon = Tool.Enabled and Mouse_Icon or Reloading_Icon
- end
- end
- function OnEquipped(ToolMouse)
- Mouse = ToolMouse
- UpdateIcon()
- end
- function OnChanged(Property)
- if Property == "Enabled" then
- UpdateIcon()
- end
- end
- Tool.Equipped:connect(OnEquipped)
- Tool.Changed:connect(OnChanged)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Add Comment
Please, Sign In to add comment