Advertisement
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"))
- Model0 = Instance.new("Model")
- UnionOperation1 = Instance.new("UnionOperation")
- Script2 = Instance.new("Script")
- PointLight3 = Instance.new("PointLight")
- Configuration4 = Instance.new("Configuration")
- IntValue5 = Instance.new("IntValue")
- Tool6 = Instance.new("Tool")
- Part7 = Instance.new("Part")
- SpecialMesh8 = Instance.new("SpecialMesh")
- Sound9 = Instance.new("Sound")
- Sound10 = Instance.new("Sound")
- Sound11 = Instance.new("Sound")
- Script12 = Instance.new("Script")
- LocalScript13 = Instance.new("LocalScript")
- Camera14 = Instance.new("Camera")
- Script15 = Instance.new("Script")
- Model0.Name = "Sword Giver"
- Model0.Parent = mas
- UnionOperation1.Name = "EquipmentSpawner"
- UnionOperation1.Parent = Model0
- UnionOperation1.CFrame = CFrame.new(-21.7876625, 0.500000894, -10.1090317, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- UnionOperation1.Position = Vector3.new(-21.787662506103516, 0.5000008940696716, -10.109031677246094)
- UnionOperation1.Color = Color3.new(0.639216, 0.635294, 0.647059)
- UnionOperation1.Size = Vector3.new(4.000000476837158, 1.0000005960464478, 4)
- UnionOperation1.Anchored = true
- UnionOperation1.BrickColor = BrickColor.new("Medium stone grey")
- UnionOperation1.brickColor = BrickColor.new("Medium stone grey")
- Script2.Parent = UnionOperation1
- table.insert(cors,sandbox(Script2,function()
- -- See if I have a tool
- local spawner = script.Parent
- local tool = nil
- local region = Region3.new(Vector3.new(spawner.Position.X - spawner.Size.X/2, spawner.Position.Y + spawner.Size.Y/2, spawner.Position.Z - spawner.Size.Z/2),
- Vector3.new(spawner.Position.X + spawner.Size.X/2, spawner.Position.Y + 4, spawner.Position.Z + spawner.Size.Z/2))
- local parts = game.Workspace:FindPartsInRegion3(region)
- for _, part in pairs(parts) do
- if part and part.Parent and part.Parent:IsA("Tool") then
- tool = part.Parent
- break
- end
- end
- local configTable = spawner.Configurations
- local configs = {}
- local function loadConfig(configName, defaultValue)
- if configTable:FindFirstChild(configName) then
- configs[configName] = configTable:FindFirstChild(configName).Value
- else
- configs[configName] = defaultValue
- end
- end
- loadConfig("SpawnCooldown", 5)
- if tool then
- tool.Parent = game.ServerStorage
- while true do
- -- put tool on pad
- local toolCopy = tool:Clone()
- local handle = toolCopy:FindFirstChild("Handle")
- toolCopy.Parent = game.Workspace
- local toolOnPad = true
- local parentConnection
- parentConnection = toolCopy.AncestryChanged:connect(function()
- if handle then handle.Anchored = false end
- toolOnPad = false
- parentConnection:disconnect()
- end)
- if handle then
- handle.CFrame = (spawner.CFrame + Vector3.new(0,handle.Size.Z/2 + 1,0)) * CFrame.Angles(-math.pi/2,0,0)
- handle.Anchored = true
- end
- -- wait for tool to be removed
- while toolOnPad do
- if handle then
- handle.CFrame = handle.CFrame * CFrame.Angles(0,0,math.pi/60)
- end
- wait()
- end
- -- wait for cooldown
- wait(configs["SpawnCooldown"])
- end
- end
- --if tool then
- -- local handle = tool:FindFirstChild("Handle")
- -- local toolCopy = tool:Clone()
- -- toolCopy.Parent = game.ServerStorage
- -- local toolOnPad = true
- --
- -- local parentConnection
- -- parentConnection = tool.AncestryChanged:connect(function()
- -- if handle then handle.Anchored = false end
- -- toolOnPad = false
- -- parentConnection:disconnect()
- -- end)
- --
- -- if handle then
- -- handle.CFrame = (spawner.CFrame + Vector3.new(0,handle.Size.Z/2 + 1,0)) * CFrame.Angles(-math.pi/2,0,0)
- -- handle.Anchored = true
- -- end
- --
- -- while true do
- -- while toolOnPad do
- -- if handle then
- -- handle.CFrame = handle.CFrame * CFrame.Angles(0,0,math.pi/60)
- -- end
- -- wait()
- -- end
- -- wait(configs["SpawnCooldown"])
- -- local newTool = toolCopy:Clone()
- -- newTool.Parent = game.Workspace
- -- handle = newTool:FindFirstChild("Handle")
- -- toolOnPad = true
- -- end
- --end
- end))
- PointLight3.Parent = UnionOperation1
- PointLight3.Color = Color3.new(0, 1, 0)
- PointLight3.Range = 10
- PointLight3.Shadows = true
- Configuration4.Name = "Configurations"
- Configuration4.Parent = UnionOperation1
- IntValue5.Name = "10"
- IntValue5.Parent = Configuration4
- IntValue5.Value = 5
- Tool6.Name = "ClassicSword"
- Tool6.Parent = Model0
- Tool6.TextureId = "rbxasset://Textures/Sword128.png"
- Tool6.Grip = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Tool6.GripForward = Vector3.new(-1, -0, -0)
- Tool6.GripPos = Vector3.new(0, 0, -1.5)
- Tool6.GripRight = Vector3.new(0, 1, 0)
- Tool6.GripUp = Vector3.new(0, 0, 1)
- Part7.Name = "Handle"
- Part7.Parent = Tool6
- Part7.CFrame = CFrame.new(-21.6015606, 3.21144986, -9.64364624, -0.989256561, 0.143087044, 0.0299602766, 0.00654005678, -0.161418796, 0.986864388, 0.146043628, 0.976458013, 0.158748806)
- Part7.Orientation = Vector3.new(-80.7030029296875, 10.687999725341797, 177.67999267578125)
- Part7.Position = Vector3.new(-21.601560592651367, 3.2114498615264893, -9.643646240234375)
- Part7.Rotation = Vector3.new(-80.86199951171875, 1.7170000076293945, -171.77000427246094)
- Part7.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part7.Size = Vector3.new(1, 0.800000011920929, 4)
- Part7.BottomSurface = Enum.SurfaceType.Smooth
- Part7.BrickColor = BrickColor.new("Dark stone grey")
- Part7.Locked = true
- Part7.Reflectance = 0.4000000059604645
- Part7.TopSurface = Enum.SurfaceType.Smooth
- Part7.brickColor = BrickColor.new("Dark stone grey")
- Part7.FormFactor = Enum.FormFactor.Plate
- Part7.formFactor = Enum.FormFactor.Plate
- SpecialMesh8.Parent = Part7
- SpecialMesh8.MeshId = "rbxasset://fonts/sword.mesh"
- SpecialMesh8.TextureId = "rbxasset://textures/SwordTexture.png"
- SpecialMesh8.MeshType = Enum.MeshType.FileMesh
- Sound9.Name = "SwordSlash"
- Sound9.Parent = Part7
- Sound9.SoundId = "http://www.roblox.com/asset/?id=12222216"
- Sound9.Volume = 0.699999988079071
- Sound10.Name = "SwordLunge"
- Sound10.Parent = Part7
- Sound10.SoundId = "http://www.roblox.com/asset/?id=12222208"
- Sound10.Volume = 0.6000000238418579
- Sound11.Name = "Unsheath"
- Sound11.Parent = Part7
- Sound11.SoundId = "http://www.roblox.com/asset/?id=12222225"
- Sound11.Volume = 1
- Script12.Name = "SwordScript"
- Script12.Parent = Tool6
- table.insert(cors,sandbox(Script12,function()
- --Rescripted by Luckymaxer
- --EUROCOW WAS HERE BECAUSE I MADE THE PARTICLES AND THEREFORE THIS ENTIRE SWORD PRETTY AND LOOK PRETTY WORDS AND I'D LIKE TO DEDICATE THIS TO MY FRIENDS AND HI LUCKYMAXER PLS FIX SFOTH SWORDS TY LOVE Y'ALl
- --Updated for R15 avatars by StarWars
- --Re-updated by TakeoHonorable
- Tool = script.Parent
- Handle = Tool:WaitForChild("Handle")
- function Create(ty)
- return function(data)
- local obj = Instance.new(ty)
- for k, v in pairs(data) do
- if type(k) == 'number' then
- v.Parent = obj
- else
- obj[k] = v
- end
- end
- return obj
- end
- end
- local BaseUrl = "rbxassetid://"
- Players = game:GetService("Players")
- Debris = game:GetService("Debris")
- RunService = game:GetService("RunService")
- DamageValues = {
- BaseDamage = 5,
- SlashDamage = 10,
- LungeDamage = 30
- }
- --For R15 avatars
- Animations = {
- R15Slash = 522635514,
- R15Lunge = 522638767
- }
- 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
- --For Omega Rainbow Katana thumbnail to display a lot of particles.
- for i, v in pairs(Handle:GetChildren()) do
- if v:IsA("ParticleEmitter") then
- v.Rate = 20
- end
- end
- 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") or Character:FindFirstChild("RightHand")
- 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:FindFirstChildOfClass("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()
- if Humanoid then
- if Humanoid.RigType == Enum.HumanoidRigType.R6 then
- local Anim = Instance.new("StringValue")
- Anim.Name = "toolanim"
- Anim.Value = "Slash"
- Anim.Parent = Tool
- elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
- local Anim = Tool:FindFirstChild("R15Slash")
- if Anim then
- local Track = Humanoid:LoadAnimation(Anim)
- Track:Play(0)
- end
- end
- end
- end
- function Lunge()
- Damage = DamageValues.LungeDamage
- Sounds.Lunge:Play()
- if Humanoid then
- if Humanoid.RigType == Enum.HumanoidRigType.R6 then
- local Anim = Instance.new("StringValue")
- Anim.Name = "toolanim"
- Anim.Value = "Lunge"
- Anim.Parent = Tool
- elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
- local Anim = Tool:FindFirstChild("R15Lunge")
- if Anim then
- local Track = Humanoid:LoadAnimation(Anim)
- Track:Play(0)
- end
- end
- end
- --[[
- if CheckIfAlive() then
- 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
- 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
- local Tick = RunService.Stepped:wait()
- if (Tick - LastAttack < 0.2) then
- Lunge()
- else
- Attack()
- end
- LastAttack = Tick
- --wait(0.5)
- Damage = DamageValues.BaseDamage
- local SlashAnim = (Tool:FindFirstChild("R15Slash") or Create("Animation"){
- Name = "R15Slash",
- AnimationId = BaseUrl .. Animations.R15Slash,
- Parent = Tool
- })
- local LungeAnim = (Tool:FindFirstChild("R15Lunge") or Create("Animation"){
- Name = "R15Lunge",
- AnimationId = BaseUrl .. Animations.R15Lunge,
- Parent = Tool
- })
- 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:FindFirstChildOfClass("Humanoid")
- Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("HumanoidRootPart")
- if not CheckIfAlive() then
- return
- end
- ToolEquipped = true
- Sounds.Unsheath:Play()
- end
- function Unequipped()
- Tool.Grip = Grips.Up
- ToolEquipped = false
- end
- Tool.Activated:Connect(Activated)
- Tool.Equipped:Connect(Equipped)
- Tool.Unequipped:Connect(Unequipped)
- Connection = Handle.Touched:Connect(Blow)
- end))
- LocalScript13.Name = "MouseIcon"
- LocalScript13.Parent = Tool6
- table.insert(cors,sandbox(LocalScript13,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))
- Camera14.Name = "ThumbnailCamera"
- Camera14.Parent = Tool6
- Camera14.CFrame = CFrame.new(-5.67428207, 2.83736515, 3.79184556, 0.289030313, 0.416664183, -0.861888885, -0, 0.900314331, 0.435240269, 0.957319915, -0.125797629, 0.260218143)
- Camera14.CoordinateFrame = CFrame.new(-5.67428207, 2.83736515, 3.79184556, 0.289030313, 0.416664183, -0.861888885, -0, 0.900314331, 0.435240269, 0.957319915, -0.125797629, 0.260218143)
- Camera14.Focus = CFrame.new(-3.9505043, 1.96688461, 3.27140927, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Camera14.focus = CFrame.new(-3.9505043, 1.96688461, 3.27140927, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Script15.Name = "Read me"
- Script15.Parent = Model0
- table.insert(cors,sandbox(Script15,function()
- -- This Sword Giver Made By Entity10185 --
- -- This Sword Giver Can be Copy --
- -- Follow My Profile for Anothers Kit --
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement