Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Gui = Instance.new("ScreenGui")
- local Top = Instance.new("Frame")
- local Main = Instance.new("Frame")
- local Sword = Instance.new("TextButton")
- Gui.Name = "Gui"
- Gui.Parent = game.CoreGui
- Top.Name = "Top"
- Top.Parent = Gui
- Top.BackgroundColor3 = Color3.new(0.529412, 0.529412, 0.529412)
- Top.Draggable=true
- Top.Active=true
- Top.BackgroundTransparency = 0.10000000149012
- Top.Position = UDim2.new(0.0170940179, 0, 0.858164489, 0)
- Top.Size = UDim2.new(0, 173, 0, 26)
- Main.Name = "Main"
- Main.Parent = Top
- Main.BackgroundColor3 = Color3.new(0.490196, 0.490196, 0.490196)
- Main.Position = UDim2.new(0, 0, 1.54907227, 0)
- Main.Size = UDim2.new(0, 173, 0, 55)
- Sword.Name = "Sword"
- Sword.Parent = Main
- Sword.BackgroundColor3 = Color3.new(0.407843, 0.337255, 0.337255)
- Sword.Size = UDim2.new(0, 173, 0, 55)
- Sword.Style = Enum.ButtonStyle.RobloxRoundDefaultButton
- Sword.Font = Enum.Font.Cartoon
- Sword.Text = "BrickSword"
- Sword.TextColor3 = Color3.new(0, 0, 0)
- Sword.TextSize = 19
- Sword.MouseButton1Down:connect(function()
- local plr = game.Players.LocalPlayer
- local tool = Instance.new("Tool",plr.Backpack)
- tool.GripPos = Vector3.new(0.1,-1,0)
- tool.Name = "Sword"
- local handle = Instance.new("Part",tool)
- handle.Name = "Handle"
- handle.Size = Vector3.new(0.4,4,0.4)
- local anim = Instance.new("Animation",tool)
- anim.AnimationId = "rbxassetid://218504594"
- local animPlay = plr.Character.Humanoid:LoadAnimation(anim)
- db = true
- da = false
- tool.Equipped:connect(function()
- tool.Activated:connect(function()
- if db == true then
- db = false
- animPlay:Play()
- wait()
- da = true
- db = true
- wait(0.1)
- da = false
- end
- end)
- handle.Touched:connect(function(part)
- if da == true then
- local hum = part.Parent.Humanoid
- if hum ~= nil then
- local oder = game.Players:FindFirstChild(part.Parent.Name)
- for i=1,10 do
- if oder.Name ~= "kokobang12" then
- game.ReplicatedStorage.meleeEvent:FireServer(oder)
- end
- end
- end
- end
- end)
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement