Help please do this

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

Here’s an example of how I’d like to do

what are you trying to achieve exactly?

If your trying to know when the player pressed the screen for kick you can do

UserInputService.InputBegan:Connect(function(input,gp)
      if input.UserInputType == Enum.UserInputType.Touch and not gp then
            print("kick started?")
      end
end)

UserInputService.InputEnded:Connect(function(input,gp)
      if input.UserInputType == Enum.UserInputType.Touch and not gp then
            print("kick finished?")
      end
end)

Where is your client code?

Look, I have a script that determines what you are playing with from the PC, then you are not given a tool, and when you press the keyboard, from the phone you are given a tool that is in the backpack, I need to take half of the script from that script in order to launch balls

local GuiService = game:GetService("GuiService")
local RS = game:GetService("ReplicatedStorage")
local player = game.Players.LocalPlayer
local event = RS.CloneTool

if UIS.TouchEnabled and not UIS.KeyboardEnabled and not UIS.MouseEnabled 
	and not UIS.GamepadEnabled and not GuiService:IsTenFootInterface() then
	event:FireServer(RS.MobilePowers:WaitForChild("Invisibility"))
	event:FireServer(RS.MobilePowers:WaitForChild("SoulHarvest"))
	event:FireServer(RS.MobilePowers:WaitForChild("EnergyFist"))
	event:FireServer(RS.MobilePowers:WaitForChild("EnergyPunch"))
	print("Mobile")
else
	print("Laptop")
end

it’s still relevant help me please do

it’s still relevant help me please do i m to glad for help me

I was able to do it, but I know that I didn’t answer for a long time, I forgot about this topic