Advertisement
Guest User

Sword GUI

a guest
Nov 11th, 2018
2,826
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. local Gui = Instance.new("ScreenGui")
  2. local Top = Instance.new("Frame")
  3. local Main = Instance.new("Frame")
  4. local Sword = Instance.new("TextButton")
  5.  
  6. Gui.Name = "Gui"
  7. Gui.Parent = game.CoreGui
  8.  
  9. Top.Name = "Top"
  10. Top.Parent = Gui
  11. Top.BackgroundColor3 = Color3.new(0.529412, 0.529412, 0.529412)
  12. Top.Draggable=true
  13. Top.Active=true
  14. Top.BackgroundTransparency = 0.10000000149012
  15. Top.Position = UDim2.new(0.0170940179, 0, 0.858164489, 0)
  16. Top.Size = UDim2.new(0, 173, 0, 26)
  17.  
  18. Main.Name = "Main"
  19. Main.Parent = Top
  20. Main.BackgroundColor3 = Color3.new(0.490196, 0.490196, 0.490196)
  21. Main.Position = UDim2.new(0, 0, 1.54907227, 0)
  22. Main.Size = UDim2.new(0, 173, 0, 55)
  23.  
  24. Sword.Name = "Sword"
  25. Sword.Parent = Main
  26. Sword.BackgroundColor3 = Color3.new(0.407843, 0.337255, 0.337255)
  27. Sword.Size = UDim2.new(0, 173, 0, 55)
  28. Sword.Style = Enum.ButtonStyle.RobloxRoundDefaultButton
  29. Sword.Font = Enum.Font.Cartoon
  30. Sword.Text = "BrickSword"
  31. Sword.TextColor3 = Color3.new(0, 0, 0)
  32. Sword.TextSize = 19
  33. Sword.MouseButton1Down:connect(function()
  34. local plr = game.Players.LocalPlayer
  35. local tool = Instance.new("Tool",plr.Backpack)
  36. tool.GripPos = Vector3.new(0.1,-1,0)
  37. tool.Name = "Sword"
  38. local handle = Instance.new("Part",tool)
  39. handle.Name = "Handle"
  40. handle.Size = Vector3.new(0.4,4,0.4)
  41. local anim = Instance.new("Animation",tool)
  42. anim.AnimationId = "rbxassetid://218504594"
  43. local animPlay = plr.Character.Humanoid:LoadAnimation(anim)
  44. db = true
  45. da = false
  46. tool.Equipped:connect(function()
  47. tool.Activated:connect(function()
  48. if db == true then
  49. db = false
  50. animPlay:Play()
  51. wait()
  52. da = true
  53. db = true
  54. wait(0.1)
  55. da = false
  56. end
  57. end)
  58.  
  59.  
  60. handle.Touched:connect(function(part)
  61. if da == true then
  62. local hum = part.Parent.Humanoid
  63. if hum ~= nil then
  64. local oder = game.Players:FindFirstChild(part.Parent.Name)
  65.  
  66.  
  67. for i=1,10 do
  68. if oder.Name ~= "kokobang12" then
  69. game.ReplicatedStorage.meleeEvent:FireServer(oder)
  70. end
  71. end
  72. end
  73. end
  74. end)
  75. end)
  76. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement