Universal Script 📌
65.7k Views
121 Executions

roll script with anim made by chatgpt

Universal Script 📌
Ps4sro
Ps4sroPublished 5
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

R to roll hold r to become sonic real credit to ocfi for the idea

Updates

  1. Script edited: Create script

View Raw
-- LocalScript in StarterPlayerScripts

local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")

local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local rolling = false
local holdingRollKey = false
local rollDuration = 0.5 -- Duration of each roll in seconds
local rollDistance = 20 -- Distance to roll per roll action

-- Animation setup
local rollAnimationId = "rbxassetid://18537367238"
local rollAnimation = Instance.new("Animation")
rollAnimation.AnimationId = rollAnimationId

local animator = humanoid:FindFirstChild("Animator") or humanoid:WaitForChild("Animator")
local rollAnimTrack = animator:LoadAnimation(rollAnimation)
rollAnimTrack.Looped = true -- Set the animation to loop

local function stopRolling()
rolling = false
rollAnimTrack:Stop()
end

local function performRoll()
local direction = character.PrimaryPart.CFrame.LookVector
local startPosition = character.PrimaryPart.Position
local targetPosition = startPosition + (direction * rollDistance)

local rollStartTime = tick()
local connection
connection = RunService.RenderStepped:Connect(function()
local elapsedTime = tick() - rollStartTime
if elapsedTime > rollDuration then
connection:Disconnect()
if holdingRollKey then


Comments

5
Log in to join the conversation. Login
Intelligenceyz's profile picture
Intelligenceyz2 years ago(edited)

It's easier to use

1
Intelligenceyz's profile picture
Intelligenceyz2 years ago(edited)

Ima release crescent star

1
Intelligenceyz's profile picture
Intelligenceyz2 years ago(edited)

Lol

1
Ps4sro's profile picture
Ps4sroUploader2 years ago(edited)

@Intelligenceyz crazy cause i made it with ai lol

1
Intelligenceyz's profile picture
Intelligenceyz2 years ago(edited)

Shi tuff asf

1

More universal scripts

See all
Script hub
178.6k
1.7M
Bumped 2 minutes ago
Key System
Universal Script 📌
9.0k
31.2k
Bumped 1 hour ago
Script hub
49.6k
12.2k
Bumped 2 hours ago
Key System
Paid
Script hub
5.5M
1.1M
Bumped 6 hours ago
Key System
Script hub
20.5k
3.9k
Bumped 7 hours ago
Key System
Paid
Universal Script 📌
629
22
Approved 13 hours ago
Universal Script 📌
576
16
Approved 13 hours ago
Universal Script 📌
541
35
Approved 13 hours ago