Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- This Script Version is V4 The lastest and last update.
- You can steal code,but put credits.
- i can return at any time
- used ui library in this script: https://github.com/bloodball/UI-Librarys/blob/main/wizard
- i need to study hard or i will be grounded by my mom xd
- This script is made by Onlyscripts in Youtube
- well have a good day i guess,bye
- ]]--
- --[[Ui]]--
- local Library = loadstring(Game:HttpGet("https://raw.githubusercontent.com/bloodball/-back-ups-for-libs/main/wizard"))()
- --[[Window]]--
- local TouchFootball = Library:NewWindow("Touch Football V4")
- --[[Sections]]--
- local sec = TouchFootball:NewSection("Scripts")
- local sect = TouchFootball:NewSection("More Scripts")
- local ser = TouchFootball:NewSection("Stats")
- local set = TouchFootball:NewSection("Stats 2")
- --[[Variables]]--
- local player = game.Players.LocalPlayer
- local character = player.Character
- local soccerBallPath = game:GetService("Workspace"):WaitForChild("FootballField")
- local soccerBall = soccerBallPath:FindFirstChild("SoccerBall")
- --[[Scripts]]--
- sec:CreateButton("Bring ball", function()
- soccerBall.Position = character.HumanoidRootPart.Position
- wait()
- local args = {
- [1] = Vector3.new(0),
- [2] = Vector3.new(0),
- [3] = Vector3.new(0),
- [4] = 0,
- [5] = "djhtelkds"
- }
- game:GetService("ReplicatedStorage").KickBall:FireServer(unpack(args))
- end)
- sec:CreateButton("Loop Bring Ball", function()
- while wait() do
- soccerBall.Position = character.HumanoidRootPart.Position
- wait()
- local args = {
- [1] = Vector3.new(0),
- [2] = Vector3.new(0),
- [3] = Vector3.new(0),
- [4] = 0,
- [5] = "djhtelkds"
- }
- game:GetService("ReplicatedStorage").KickBall:FireServer(unpack(args))
- end
- end)
- sec:CreateButton("Freeze Ball", function()
- while wait() do
- local args = {
- [1] = Vector3.new(0),
- [2] = Vector3.new(0),
- [3] = Vector3.new(0),
- [4] = 0,
- [5] = "djhtelkds"
- }
- game:GetService("ReplicatedStorage").KickBall:FireServer(unpack(args))
- end
- end)
- sec:CreateButton("Freeze ball 2 (Can't be stopped)", function()
- while wait() do
- local args = {
- [1] = Vector3.new(0),
- [2] = Vector3.new(0),
- [3] = Vector3.new(0),
- [4] = 0,
- [5] = "djhtelkds"
- }
- game:GetService("ReplicatedStorage").KickBall:FireServer(unpack(args))
- end
- end)
- sec:CreateButton("Destroy ball", function()
- local args = {
- [1] = Vector3.new(560.5654296875, 600.843505859375, 1582.93701171875),
- [2] = Vector3.new(560.5654296875, 600.843505859375, 1582.93701171875),
- [3] = Vector3.new(560.5654296875, 600.843505859375, 1582.93701171875),
- [4] = 0,
- [5] = "djhtelkds"
- }
- game:GetService("ReplicatedStorage").KickBall:FireServer(unpack(args))
- end)
- sect:CreateButton("Goal A team", function()
- -- KickBall event because for GoalEvent work
- local args = {
- [1] = Vector3.new(0),
- [2] = Vector3.new(0),
- [3] = Vector3.new(0),
- [4] = 0,
- [5] = "djhtelkds"
- }
- game:GetService("ReplicatedStorage").KickBall:FireServer(unpack(args))
- wait()
- -- GoalEvent
- local args = {
- [1] = "A"
- }
- game:GetService("ReplicatedStorage").GoalEvent:FireServer(unpack(args))
- end)
- sect:CreateButton("Goal B team", function()
- -- KickBall event because for GoalEvent work
- local args = {
- [1] = Vector3.new(0),
- [2] = Vector3.new(0),
- [3] = Vector3.new(0),
- [4] = 0,
- [5] = "djhtelkds"
- }
- game:GetService("ReplicatedStorage").KickBall:FireServer(unpack(args))
- wait()
- -- GoalEvent
- local args = {
- [1] = "B"
- }
- game:GetService("ReplicatedStorage").GoalEvent:FireServer(unpack(args))
- end)
- sect:CreateButton("Bring ball on dive", function()
- -- Credits too owner
- -- Animation IDs for diving
- local diveAnimationIds = {
- "rbxassetid://16428780736",
- "rbxassetid://16428788224",
- "rbxassetid://16428773038",
- "rbxassetid://16428797277"
- }
- -- Function to update the soccer ball reference
- local function updateSoccerBall()
- soccerBall = soccerBallPath:FindFirstChild("SoccerBall")
- if soccerBall then
- print("SoccerBall found:", soccerBall.Name)
- else
- warn("SoccerBall not found in the workspace!")
- end
- end
- -- Teleport the soccer ball
- local function teleportSoccerBall()
- if character and soccerBall then
- local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
- if humanoidRootPart then
- local newPosition = humanoidRootPart.CFrame + (humanoidRootPart.CFrame.LookVector * 2)
- -- Check if the ball can be teleported
- if soccerBall:IsA("BasePart") then
- soccerBall.CFrame = newPosition
- print("Ball teleported to position:", newPosition.Position)
- elseif soccerBall:IsA("Model") and soccerBall.PrimaryPart then
- soccerBall:SetPrimaryPartCFrame(newPosition)
- print("Model teleported to position:", newPosition.Position)
- else
- warn("SoccerBall is neither a BasePart nor a Model with a PrimaryPart!")
- end
- else
- warn("HumanoidRootPart is missing!")
- end
- else
- warn("Character or SoccerBall is not available!")
- end
- end
- -- Monitor animations played by the humanoid's Animator
- local function detectDiveAnimations()
- local humanoid = character:WaitForChild("Humanoid")
- local animator = humanoid:FindFirstChildOfClass("Animator")
- if animator then
- animator.AnimationPlayed:Connect(function(animationTrack)
- local animationId = animationTrack.Animation.AnimationId
- if table.find(diveAnimationIds, animationId) then
- print("Dive animation detected:", animationId)
- teleportSoccerBall()
- end
- end)
- else
- warn("Animator not found in humanoid!")
- end
- end
- -- Ball tracking
- soccerBallPath.ChildAdded:Connect(function(child)
- if child.Name == "SoccerBall" then
- soccerBall = child
- print("New SoccerBall detected:", child.Name)
- end
- end)
- -- Initial setup
- updateSoccerBall()
- detectDiveAnimations()
- end)
- sect:CreateTextbox("bring ball to player", function(text)
- local targetPlayerName = text
- local oldpos = character.HumanoidRootPart.CFrame
- local function teleportToPlayer()
- local targetPlayer = game:GetService("Players"):FindFirstChild(targetPlayerName)
- if targetPlayer then
- character.HumanoidRootPart.CFrame = targetPlayer.Character.HumanoidRootPart.CFrame
- wait()
- soccerBall.Position = character.HumanoidRootPart.Position
- wait(0.3)
- character.HumanoidRootPart.CFrame = oldpos
- else
- warn("Player not found")
- end
- end
- teleportToPlayer()
- end)
- ser:CreateTextbox("BPA (CLIENT-SIDED)", function(text)
- game:GetService("Players").LocalPlayer.leaderstats.BPA.Value = text
- end)
- ser:CreateTextbox("Clan (CLIENT-SIDED)", function(text)
- game:GetService("Players").LocalPlayer.leaderstats.Clan.Value = text
- end)
- ser:CreateTextbox("Goals (CLIENT-SIDED)", function(text)
- game:GetService("Players").LocalPlayer.leaderstats.Goals.Value = text
- end)
- ser:CreateTextbox("Wins (CLIENT-SIDED)", function(text)
- game:GetService("Players").LocalPlayer.leaderstats.Wins.Value = text
- end)
- set:CreateTextbox("Bucks (CLIENT-SIDED)", function(text)
- game:GetService("Players").LocalPlayer.hiddendata.Bucks.Value = text
- end)
- set:CreateTextbox("Assists (CLIENT-SIDED)", function(text)
- game:GetService("Players").LocalPlayer.hiddendata.Assists.Value = text
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement