Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- template
- -- Objects
- local ScreenGui = Instance.new("ScreenGui")
- local GUI = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local SwordAttack = Instance.new("TextButton")
- local Credits = Instance.new("TextLabel")
- -- Properties
- ScreenGui.Parent = game.CoreGui
- GUI.Name = "GUI"
- GUI.Parent = ScreenGui
- GUI.BackgroundColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314)
- GUI.BorderColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
- GUI.BorderSizePixel = 0
- GUI.Position = UDim2.new(0, 0, 0.330039531, 0)
- GUI.Size = UDim2.new(0, 316, 0, 339)
- GUI.Style = Enum.FrameStyle.RobloxRound
- Title.Name = "Title"
- Title.Parent = GUI
- Title.Active = true
- Title.BackgroundColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
- Title.Position = UDim2.new(0.114720426, 0, 0.00523944944, 0)
- Title.Size = UDim2.new(0, 200, 0, 50)
- Title.Font = Enum.Font.SourceSans
- Title.Text = "The Chicken SwordFight GUI"
- Title.TextColor3 = Color3.new(1, 1, 1)
- Title.TextSize = 14
- SwordAttack.Name = "SwordAttack"
- SwordAttack.Parent = GUI
- SwordAttack.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
- SwordAttack.Position = UDim2.new(0.114720426, 0, 0.233038351, 0)
- SwordAttack.Size = UDim2.new(0, 200, 0, 50)
- SwordAttack.Font = Enum.Font.SourceSans
- SwordAttack.Text = "Sword Attack"
- SwordAttack.TextColor3 = Color3.new(1, 1, 1)
- SwordAttack.TextSize = 14
- SwordAttack.MouseButton1Down:connect(function()
- local A_1 = "chicken"
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- local localPlayer = game.Players.LocalPlayer
- local hum = localPlayer.Character.HumanoidRootPart
- local playerList = game.Players:GetChildren()
- local radius = 40
- for i = 1, #playerList do
- if playerList[i]:DistanceFromCharacter(localPlayer.Character.Head.Position) < radius then --Vector3 can be the Position property of a part if you want.
- if playerList[i].Character ~= localPlayer.Character and playerList[i].Character.Humanoid.Health > 0 then
- Event:FireServer(A_1, A_2)
- for z = 1, 9 do
- if playerList[i].Character.Humanoid.Health > 0 then
- hum.CFrame = playerList[i].Character.Head.CFrame * CFrame.new(-1,-1,2)
- wait()
- hum.CFrame = playerList[i].Character.Head.CFrame * CFrame.new(-1.5,-1,2)
- wait()
- hum.CFrame = playerList[i].Character.Head.CFrame * CFrame.new(-.5,-1,2)
- wait()
- end
- end
- end
- end
- end
- end)
- Credits.Name = "Credits"
- Credits.Parent = GUI
- Credits.BackgroundColor3 = Color3.new(1, 1, 1)
- Credits.Position = UDim2.new(0.00316455704, 0, 0.943952799, 0)
- Credits.Size = UDim2.new(0, 109, 0, 18)
- Credits.Font = Enum.Font.SourceSans
- Credits.Text = "Credits to MRob"
- Credits.TextSize = 14
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement