how to make maximum red | studio lite

  Рет қаралды 226

Coolgo_lite

Coolgo_lite

Күн бұрын

Thanks for watching!
Follow my Roblox account: www.roblox.com...
Script (put inside the button):
- script Made by coolgo_lite-
-like and subscribe-
local player = game.Players.LocalPlayer
local button = script.Parent -- TextButton
local redBall = nil
local soundEffect = nil
local animation = nil
local humanoid = player.Character and player.Character:FindFirstChild("Humanoid")
local cooldownTime = 5 -- Cooldown time in seconds
local canUseAbility = true -- Variable to track if the ability can be used
button.MouseButton1Click:Connect(function()
-- Prevent ability from being used if on cooldown
if not canUseAbility then
return
end
-- Disable the button for cooldown period (visual feedback if needed)
canUseAbility = false
button.Text = "Cooldown..." -- Change button text to indicate cooldown
-- Ensure the player's character and humanoid are present
if not player.Character or not player.Character:FindFirstChild("HumanoidRootPart") or not humanoid then
warn("Character or HumanoidRootPart not found")
return
end
-- Disable player movement (set WalkSpeed to 0)
humanoid.WalkSpeed = 0
-- Create the red ball
redBall = Instance.new("Part")
redBall.Size = Vector3.new(3, 3, 3)
redBall.Shape = Enum.PartType.Ball
redBall.Color = Color3.fromRGB(255, 0, 0)
redBall.Material = Enum.Material.Neon
redBall.Anchored = true
redBall.CFrame = player.Character.HumanoidRootPart.CFrame * CFrame.new(0, 2, -5)
redBall.Parent = workspace
-- Add sound
soundEffect = Instance.new("Sound")
soundEffect.SoundId = "rbxassetid://9125635285" -- Sound ID
soundEffect.Parent = redBall
soundEffect:Play()
-- Add animation
animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://52154760" -- Animation ID
local animTrack = humanoid:LoadAnimation(animation)
animTrack:Play()
-- Wait for 2 seconds before the ball starts moving
task.wait(2)
-- Unanchor the ball and move it
redBall.Anchored = false
local direction = player.Character.HumanoidRootPart.CFrame.LookVector
local speed = 50 -- Ball speed
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(100000, 100000, 100000)
bodyVelocity.Velocity = direction * speed
bodyVelocity.Parent = redBall
-- Stop animation once the ball launches
animTrack:Stop()
-- Re-enable player movement (reset WalkSpeed to 16)
humanoid.WalkSpeed = 16
-- Function to handle collision
local function onTouch(hit)
-- If it touches a BasePart
if hit:IsA("BasePart") then
if hit ~= redBall then -- Avoid destroying the ball itself
hit:Destroy() -- Destroy the part
end
redBall:Destroy() -- Destroy the ball after the effect
redBall = nil
end
-- If it touches a player
if hit.Parent:FindFirstChild("Humanoid") then
local targetHumanoid = hit.Parent:FindFirstChild("Humanoid")
if targetHumanoid and hit.Parent ~= player.Character then
targetHumanoid.Health = 0 -- Kill the player
redBall:Destroy() -- Destroy the ball
redBall = nil
end
end
end
-- Connect the touch event to the function
redBall.Touched:Connect(onTouch)
-- Destroy the ball after 5 seconds if nothing touched it
task.delay(5, function()
if redBall then
redBall:Destroy()
redBall = nil
end
end)
-- Start cooldown
task.wait(cooldownTime)
-- Re-enable the button and ability after cooldown
button.Text = "Use Ability"
canUseAbility = true
end)

Пікірлер: 22
@coolgo_dev
@coolgo_dev Ай бұрын
Give me yours videos ideas 💡
@sanjidaafrinshapna355
@sanjidaafrinshapna355 Ай бұрын
Make a video of playing subscriber games
@coolgo_dev
@coolgo_dev Ай бұрын
@sanjidaafrinshapna355 ok man
@sanjidaafrinshapna355
@sanjidaafrinshapna355 Ай бұрын
My username is HaGu_318
@Flush-Frenzy
@Flush-Frenzy Ай бұрын
Pls make next in same tutorial How to make teleport Button that teleport for part and give Tool at the same time pls:(
@Flush-Frenzy
@Flush-Frenzy Ай бұрын
No one I watched did this, I have 5 KZbin accounts, if you do this you get 5 subscriptions and a "THANK YOU SO MUCH"
@trixi_0829
@trixi_0829 Ай бұрын
how to make a hoverboard and to buy it we need to buy the gamepass
@KyleCummings-qd5hi
@KyleCummings-qd5hi Ай бұрын
Bro u never even made my vid idea
@coolgo_dev
@coolgo_dev Ай бұрын
@@KyleCummings-qd5hi I'm soo sorry but there are no trains in studio lite
@Fluffernater
@Fluffernater Ай бұрын
Ok cool but it looks like trash? Why not just use actual studio
@Ming_tiang
@Ming_tiang Ай бұрын
Because some people don't have computers don't you know that?
@Fluffernater
@Fluffernater Ай бұрын
@@Ming_tiang lmao then give up on gamedev till you can save for one 🤣🤣
@changingmyytcauseitscringe
@changingmyytcauseitscringe 7 күн бұрын
​@@Fluffernaterthey might have not enough for one PC,just let then mind their own business
@LBRblx
@LBRblx Ай бұрын
Guys its Client
@coolgo_dev
@coolgo_dev Ай бұрын
@@LBRblx ?
@Tfewlr
@Tfewlr Ай бұрын
​@@coolgo_devThat means other player can't see it, because you used a local script instead of script and local script execute on the client and not the server. That means other player can't see the ball.
@coolgo_dev
@coolgo_dev Ай бұрын
@flinding oh thanks for explanation
@stickman_animacion_yt
@stickman_animacion_yt Ай бұрын
Did You copie me
@coolgo_dev
@coolgo_dev Ай бұрын
@@stickman_animacion_yt no
I Made ROBLOX's Hardest Game.
16:06
Feodoric
Рет қаралды 460 М.
How to make hollow purple in studio lite!
2:14
Jumping Vegetable
Рет қаралды 1 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
NEW KJ Moves VS Anime Comparison in The Strongest Battlegrounds
4:15
OG Shinobi
Рет қаралды 3,6 МЛН
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 7 МЛН
The BEST Way To Make Maximum Profits In Roblox's Anomic
13:56
Scammers PANIC After I Hack Their Live CCTV Cameras!
23:20
NanoBaiter
Рет қаралды 29 МЛН
How I Got the World Record on Roblox's “Hardest Game”
21:38
PinkLeaf
Рет қаралды 1,7 МЛН
Minecraft Without Jumping, but Auto-Jump is on…
15:08
GuyBordo
Рет қаралды 1,6 МЛН
(Part 1) PET EQUIP/PET FOLLOW TUTORIAL TO MY GAME! Studio Lite!
10:16
How To Make A GREAT Discord Server (Full Setup)
15:57
Stacks
Рет қаралды 1,1 МЛН
What is the best animation rig for Roblox videos? (R6 Vs R15 Breakdown)
14:09
Roblox Specialized Video Production
Рет қаралды 217 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН