Hello everyone, I’ve created a script for energy kick well in short release the ball I made it only for PC gamers but I would like to make it for mobile I have everything I need I have a script that determines what you are playing with and I need half of my script to take and paste into the tool the item that is in the replicated store will be glad everyone for help here’s the script myself
local TakeDamage = game:GetService("ReplicatedStorage").FireTakeDamage -- Assuming this is a RemoteEvent for damage handling
local Debris = game:GetService("Debris")
event.OnServerEvent:Connect(function(player, power, mouse)
local character = game.Workspace:WaitForChild(player.Name)
local strength = player.Strength.Value
local punchModelName = "EnergyPunchYellow" -- Default model name
if strength >= 100 and strength < 1000000 then
punchModelName = "EnergyPunchYellow" -- Update this to the appropriate asset name for the red ball
elseif strength >= 1000000 and strength < 100000000 then -- Whatever color you want this range to be in
punchModelName = "EnergyPunchDarkBlue"
elseif strength >= 100000000 and strength < 1000000000 then
punchModelName = "EnergyPunchGreen" -- Update this to the appropriate asset name for the blue ball
elseif strength >= 1000000000 and strength < 1000000000000 then
punchModelName = "EnergyPunchPurple" -- Update this to the appropriate asset name for the blue ball
elseif strength >= 1000000000000 and strength < 10000000000000 then
punchModelName = "EnergyPunchRed" -- Update this to the appropriate asset name for the blue ball
elseif strength >= 10000000000000 and strength < 1000000000000000 then
punchModelName = "EnergyPunchDarkerGreen" -- Update this to the appropriate asset name for the blue ball
elseif strength >= 1000000000000000 and strength < 10000000000000000 then
punchModelName = "EnergyPunchWhite" -- Update this to the appropriate asset name for the blue ball
elseif strength >= 10000000000000000 and strength < 1000000000000000000000 then
punchModelName = "EnergyPunchCyan" -- Update this to the appropriate asset name for the blue ball
elseif strength >= 1000000000000000000000 and strength < 1000000000000000000000000 then
punchModelName = "EnergyPunchGiantRed" -- Update this to the appropriate asset name for the blue ball
elseif strength >= 1000000000000000000000000 and strength < 1000000000000000000000000000 then
punchModelName = "EnergyPunchGiantPink" -- Update this to the appropriate asset name for the blue ball
elseif strength >= 1000000000000000000000000000 and strength < 1000000000000000000000000000000 then
punchModelName = "EnergyPunchGiantLime" -- Update this to the appropriate asset name for the blue ball
elseif strength >= 1000000000000000000000000000000 and strength < 1000000000000000000000000000000000 then
punchModelName = "EnergyPunchBigWhite" -- Update this to the appropriate asset name for the blue ball
elseif strength >= 1000000000000000000000000000000000 and strength < 1000000000000000000000000000000000000 then
punchModelName = "EnergyPunchBigBlack" -- Update this to the appropriate asset name for the blue ball
elseif strength >= 1000000000000000000000000000000000000 and strength < 1000000000000000000000000000000000000000 then
punchModelName = "EnergyPunchBigGold" -- Update this to the appropriate asset name for the blue ball
elseif strength >= 1000000000000000000000000000000000000000 and strength < 1000000000000000000000000000000000000000000 then
punchModelName = "EnergyPunchGiantRainbow" -- Update this to the appropriate asset name for the blue ball
end
if power == "energy punch" then
if not game.Workspace:FindFirstChild(player.Name.."'s Energy Blast") then
local punch = game.ServerStorage.Powers[punchModelName]:Clone()
punch.CFrame = character.HumanoidRootPart.CFrame
punch.Name = player.Name.."'s Energy Blast"
punch.Parent = game.Workspace
local antiGrav = Instance.new("BodyForce")
antiGrav.Force = Vector3.new(0, workspace.Gravity * punch:GetMass(), 0)
antiGrav.Parent = punch
punch.Velocity = CFrame.new(player.Character.HumanoidRootPart.Position, mouse).lookVector * 450
if not player.Safe.Value then
punch.Touched:Connect(function(hit)
local DMG = player.Strength.Value + 1
if hit.Parent ~= character and game.Players:GetPlayerFromCharacter(hit.Parent) then
TakeDamage:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent), player)
local tag = Instance.new("ObjectValue")
tag.Value = player
tag.Name = "creator"
tag.Parent = hit.Parent.Humanoid
game:GetService("Debris"):AddItem(tag, 0.5)
script.Disabled = true
wait(0.1)
script.Disabled = false
end
end)
end
Debris:AddItem(punch, 1.3)
end
end