Driving Empire [RP SERVERS✨]
36.0k Views
43 Executions

Event script for Candy

Driving Empire
shresthasachin710
shresthasachin710Published 10
3 years ago
Please login to perform these actions:

Event script for Candy is a Driving Empire script for Roblox, uploaded to ScriptBlox on Dec 25, 2023.

Does it work?

No reports yet

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

Also noticed:

Description

Start and Stop button simple

View Raw
-- Create GUI
local player = game.Players.LocalPlayer
local gui = Instance.new("ScreenGui")
gui.Name = "PresentTeleportGUI"
gui.Parent = player.PlayerGui

local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 100, 0, 70)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
frame.Parent = gui

local startButton = Instance.new("TextButton")
startButton.Size = UDim2.new(0, 80, 0, 30)
startButton.Position = UDim2.new(0, 10, 0, 10)
startButton.BackgroundColor3 = Color3.new(0, 1, 0)
startButton.Text = "Start"
startButton.TextColor3 = Color3.new(1, 1, 1)
startButton.Parent = frame

local stopButton = Instance.new("TextButton")
stopButton.Size = UDim2.new(0, 80, 0, 30)
stopButton.Position = UDim2.new(0, 10, 0, 40)
stopButton.BackgroundColor3 = Color3.new(1, 0, 0)
stopButton.Text = "Stop"
stopButton.TextColor3 = Color3.new(1, 1, 1)
stopButton.Parent = frame

-- Variables
local isTeleporting = false
local teleportDuration = 0.2

-- Function to teleport
local function teleportToPresent()
    while isTeleporting do
        for _, presentSpawn in pairs(game.Workspace.PresentSpawnLocations:GetChildren()) do
            if presentSpawn:IsA("BasePart") then
                local position = presentSpawn.Position
                player.Character:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(position)
                wait(teleportDuration)


Comments

2
Log in to join the conversation. Login
shresthasachin710's profile picture
shresthasachin710Uploader3 years ago(edited)

am on macbook

1
Just_Want_Candy's profile picture
Just_Want_Candy3 years ago(edited)

wich executer did you use ?

1