Advertisement
MRobbin99

SwordFighting General Script GUI

Feb 17th, 2019
4,202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. -- template
  2.  
  3.  
  4.  
  5. -- Objects
  6.  
  7. local ScreenGui = Instance.new("ScreenGui")
  8. local GUI = Instance.new("Frame")
  9. local Title = Instance.new("TextLabel")
  10. local SwordAttack = Instance.new("TextButton")
  11. local Credits = Instance.new("TextLabel")
  12.  
  13. -- Properties
  14.  
  15. ScreenGui.Parent = game.CoreGui
  16.  
  17. GUI.Name = "GUI"
  18. GUI.Parent = ScreenGui
  19. GUI.BackgroundColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314)
  20. GUI.BorderColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
  21. GUI.BorderSizePixel = 0
  22. GUI.Position = UDim2.new(0, 0, 0.330039531, 0)
  23. GUI.Size = UDim2.new(0, 316, 0, 339)
  24. GUI.Style = Enum.FrameStyle.RobloxRound
  25.  
  26. Title.Name = "Title"
  27. Title.Parent = GUI
  28. Title.Active = true
  29. Title.BackgroundColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
  30. Title.Position = UDim2.new(0.114720426, 0, 0.00523944944, 0)
  31. Title.Size = UDim2.new(0, 200, 0, 50)
  32. Title.Font = Enum.Font.SourceSans
  33. Title.Text = "The Chicken SwordFight GUI"
  34. Title.TextColor3 = Color3.new(1, 1, 1)
  35. Title.TextSize = 14
  36.  
  37. SwordAttack.Name = "SwordAttack"
  38. SwordAttack.Parent = GUI
  39. SwordAttack.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  40. SwordAttack.Position = UDim2.new(0.114720426, 0, 0.233038351, 0)
  41. SwordAttack.Size = UDim2.new(0, 200, 0, 50)
  42. SwordAttack.Font = Enum.Font.SourceSans
  43. SwordAttack.Text = "Sword Attack"
  44. SwordAttack.TextColor3 = Color3.new(1, 1, 1)
  45. SwordAttack.TextSize = 14
  46. SwordAttack.MouseButton1Down:connect(function()
  47. local A_1 = "chicken"
  48. local A_2 = "All"
  49. local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
  50.  
  51. local localPlayer = game.Players.LocalPlayer
  52. local hum = localPlayer.Character.HumanoidRootPart
  53. local playerList = game.Players:GetChildren()
  54. local radius = 40
  55. for i = 1, #playerList do
  56. if playerList[i]:DistanceFromCharacter(localPlayer.Character.Head.Position) < radius then --Vector3 can be the Position property of a part if you want.
  57. if playerList[i].Character ~= localPlayer.Character and playerList[i].Character.Humanoid.Health > 0 then
  58. Event:FireServer(A_1, A_2)
  59. for z = 1, 9 do
  60. if playerList[i].Character.Humanoid.Health > 0 then
  61. hum.CFrame = playerList[i].Character.Head.CFrame * CFrame.new(-1,-1,2)
  62. wait()
  63. hum.CFrame = playerList[i].Character.Head.CFrame * CFrame.new(-1.5,-1,2)
  64. wait()
  65. hum.CFrame = playerList[i].Character.Head.CFrame * CFrame.new(-.5,-1,2)
  66. wait()
  67. end
  68. end
  69. end
  70. end
  71. end
  72. end)
  73.  
  74.  
  75.  
  76.  
  77.  
  78. Credits.Name = "Credits"
  79. Credits.Parent = GUI
  80. Credits.BackgroundColor3 = Color3.new(1, 1, 1)
  81. Credits.Position = UDim2.new(0.00316455704, 0, 0.943952799, 0)
  82. Credits.Size = UDim2.new(0, 109, 0, 18)
  83. Credits.Font = Enum.Font.SourceSans
  84. Credits.Text = "Credits to MRob"
  85. Credits.TextSize = 14
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement