This is actually a cash giver. when it steps on it gets 1000 cash > screen should fade in with black visible GUI so he cant see anything > gets teleported to location also i don't know how to make random locations at once please help me! like i put 5 coords and they can be teleported there by random chance but not randomly anywhere to be stuck
amount = 1000
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if (h~=nil) then
local thisplr = game.Players:findFirstChild(h.Parent.Name)
if (thisplr~=nil) then
local stats = thisplr:findFirstChild("leaderstats")
if (stats~=nil) then
local score = stats:findFirstChild("Cash")
if (score~=nil) then
score.Value = score.Value + amount
end
end
end
end
end
script.Parent.Touched:connect(onTouched)
function onTouched(part)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.9
wait(0.1)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.8
wait(0.1)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.7
wait(0.1)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.6
wait(0.1)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.5
wait(0.1)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.4
wait(0.1)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.3
wait(0.1)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.2
wait(0.1)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.1
wait(0.1)
script.Parent.Blackout.Frame.BackgroundTransparency = 0
wait(5)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.1
wait(0.2)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.2
wait(0.2)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.3
wait(0.2)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.4
wait(0.2)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.5
wait(0.2)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.6
wait(0.2)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.7
wait(0.2)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.8
wait(0.2)
script.Parent.Blackout.Frame.BackgroundTransparency = 0.9
wait(0.2)
script.Parent.Blackout.Frame.BackgroundTransparency = 1
end
script.Parent.Touched:connect(onTouched)
function teleportPlayer(pos, torso)
local char = torso
char.CFrame = CFrame.new(Vector3.new(pos.x, pos.y + 7, pos.z))
end
function onTouched(part)
if part.Parent ~= nil then
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
teleportPlayer(Vector3.new(460.2, 131.59, -265.4), part.Parent.Torso)
end
end
end
script.Parent.Touched:connect(onTouched)
i don't know how to locate the gui within the script anyone ?.... please ..

4 comments
confused lol
The blackout and frame is a gui i want to use it to use fade ins and fade outs as i wrote first. How can it be confusing ? Whenever u step on it gives u 1000 cash then should fade in wait few secs fade out which doesnt then appear in new place which teles u to the coordinates as wrote in script....
I'll never get an answer, ever lol
can someone help me ?