Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mshopdoor = game.Workspace.mshopoutside.mshopoutside
- mshopinside = game.Workspace.mshopinside.mshopinsidedoor
- local debounce = false
- mshopdoor.Touched:Connect(function()
- if not debounce then
- debounce = true
- print("This is laggy")
- script.Parent.Parent.PlayerGui:WaitForChild("shopscreen").shopframe.Visible = true
- for i = 1,10 do
- script.Parent.Parent.PlayerGui:WaitForChild("shopscreen").shopframe.BackgroundTransparency = script.Parent.Parent.PlayerGui:WaitForChild("shopscreen").shopframe.Transparency - 0.1
- wait(0.01)
- end
- script.Parent.Parent.Character.HumanoidRootPart.CFrame = game.Workspace.mshopinside.tppart.CFrame
- for i = 1,10 do
- script.Parent.Parent.PlayerGui:WaitForChild("shopscreen").shopframe.BackgroundTransparency = script.Parent.Parent.PlayerGui:WaitForChild("shopscreen").shopframe.Transparency + 0.1
- wait(0.01)
- end
- script.Parent.Parent.PlayerGui:WaitForChild("shopscreen").shopframe.Visible = false
- debounce = false
- end
- end)
- mshopinside.Touched:Connect(function()
- if not debounce then
- debounce = true
- print("This is laggy")
- script.Parent.Parent.PlayerGui:WaitForChild("shopscreen").shopframe.Visible = true
- for i = 1,10 do
- script.Parent.Parent.PlayerGui:WaitForChild("shopscreen").shopframe.BackgroundTransparency = script.Parent.Parent.PlayerGui:WaitForChild("shopscreen").shopframe.Transparency - 0.1
- wait(0.01)
- end
- script.Parent.Parent.Character.HumanoidRootPart.CFrame = game.Workspace.mshopoutside.mshopoutsidepart.CFrame
- for i = 1,10 do
- script.Parent.Parent.PlayerGui:WaitForChild("shopscreen").shopframe.BackgroundTransparency = script.Parent.Parent.PlayerGui:WaitForChild("shopscreen").shopframe.Transparency + 0.1
- wait(0.01)
- end
- script.Parent.Parent.PlayerGui:WaitForChild("shopscreen").shopframe.Visible = false
- debounce = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement