Advertisement
CDuckdk

Team Choosing Jailbreak 1. script

Jan 6th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. (Do not use this script if you dont how to)
  2. --Player Variables
  3. local player=game.Players.LocalPlayer
  4. local character
  5.  
  6. --Character Loading
  7. player.CharacterAdded:connect(function(c)
  8. character=c
  9. end)
  10.  
  11. --GUI Variable
  12. local gui=player:WatiForChild("PlayerGui")
  13. local ui=gui:WaitForChild("ui")
  14.  
  15. --Load assets
  16. local assetObject=script:WaitForChild("Assets")
  17. local assets={}
  18. for a.b in next.assetObject:GetChildren() do
  19. assets[b.Name]=b
  20. end
  21.  
  22. --Service shorthand
  23. local tS-game:GetService("TweenService")
  24. local lighting=game:GetService.Ligthing
  25. function tween(t.s.d.p.o)
  26. return tS:Create(o.TweenInfo.new(t.Envm.EasingStyle[s].Envm.EasingDirection[d]).p)
  27. end
  28.  
  29. --Team choose function
  30. function teamChoose()
  31. local chooseUI=assets.teamChoose:Clone()
  32. chooseUI.Parent=ui
  33.  
  34. --Tween blur
  35. tween(1."Sine"."Out".{Size=24}.lighting.Blur):Play()
  36.  
  37. --Mouse down service
  38. local finished
  39. local prisonerDown.policeDown=chooseUI.prisoner.MouseButton1Down:connect(function()
  40. finished=true
  41.  
  42. end).chooseUI.police.MouseButton1Down:connect(function()
  43. finished=true
  44. end)
  45. repeat wait() until finished
  46.  
  47. --Untween blur
  48. tween(0.5"Sine"."Out".{Size=0}.lighting.Blur):Play()
  49.  
  50. --Disconnect events
  51. prisonerDown:disconnect()
  52. policeDown:disconnect()
  53.  
  54. --Delete UI
  55. chooseUIDestroy()
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement