
4.7k Views
152 Executions
Fling beta
Universal Script 📌
Imhavk8Published 5
2 years ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Will fling anyone you tap Og code do not take
Updates
Script edited: Create script
-- Place this in a LocalScript (e.g., StarterPlayerScripts)
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
-- Function to fling the player
local function flingPlayer(character)
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if humanoidRootPart then
-- Apply a random fling direction
local forceDirection = Vector3.new(
math.random(-50, 50),
math.random(50, 100), -- Ensure upward motion
math.random(-50, 50)
)
humanoidRootPart.Velocity = forceDirection
end
end
-- Function to handle touch input
local function onTouchInput(input)
if input.UserInputType == Enum.UserInputType.Touch then
local touchLocation = input.Position
local target = workspace:FindPartOnRayWithIgnoreList(
Ray.new(workspace.CurrentCamera.CFrame.Position, (workspace.CurrentCamera:ScreenPointToRay(touchLocation.X, touchLocation.Y).Direction) * 1000),
{Players.LocalPlayer.Character}
)
if target and target.Parent and target.Parent:FindFirstChild("Humanoid") then
local targetPlayer = Players:GetPlayerFromCharacter(target.Parent)
if targetPlayer and targetPlayer ~= Players.LocalPlayer then
flingPlayer(target.Parent)
end
end
end
end
-- Connect touch input to function
UserInputService.InputBegan:Connect(onTouchInput)
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







