Advertisement
Baloomi

Hamster Code #1

Jul 20th, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.32 KB | None | 0 0
  1. wait(1)
  2. module1 = require(script.Parent.Parent.HamsterShowcase.Module3D)
  3. user = script.Parent.Parent.Parent.Parent
  4. local stats = user:WaitForChild('stats')
  5. local frame = script.Parent.Parent.HamsterShowcase
  6. RightButton = script.Parent.Next
  7. LeftButton = script.Parent.Back
  8. Page = script.Parent.PageValue
  9. local Disabled = false
  10. Name = script.Parent.Nametag
  11. NameShadow = Name.Shadow
  12.  
  13. local cat = script.Parent.Cat
  14.  
  15. guy1 = game:GetService('ReplicatedStorage').Hamster1
  16. guy2 = game:GetService('ReplicatedStorage').Hamster2
  17. guy3 = game:GetService('ReplicatedStorage').Hamster3
  18. guy4 = game:GetService('ReplicatedStorage').Hamster4
  19. guy5 = game:GetService('ReplicatedStorage').Hamster5
  20. guy6 = game:GetService('ReplicatedStorage').Hamster6
  21. guy7 = game:GetService('ReplicatedStorage').Hamster7
  22. guy8 = game:GetService('ReplicatedStorage').Hamster8
  23. guy9 = game:GetService('ReplicatedStorage').Hamster9
  24. guy10 = game:GetService('ReplicatedStorage').Hamster10
  25. guy11 = game:GetService('ReplicatedStorage').Hamster11
  26. guy12 = game:GetService('ReplicatedStorage').Hamster12
  27.  
  28. local model1 = module1:Attach3D(frame,guy1)
  29. local model2 = module1:Attach3D(frame,guy2)
  30. local model3 = module1:Attach3D(frame,guy3)
  31. local model4 = module1:Attach3D(frame,guy4)
  32. local model5 = module1:Attach3D(frame,guy5)
  33. local model6 = module1:Attach3D(frame,guy6)
  34. local model7 = module1:Attach3D(frame,guy7)
  35. local model8 = module1:Attach3D(frame,guy8)
  36. local model9 = module1:Attach3D(frame,guy9)
  37. local model10 = module1:Attach3D(frame,guy10)
  38. local model11 = module1:Attach3D(frame,guy11)
  39. local model12 = module1:Attach3D(frame,guy12)
  40.  
  41. model1:SetActive(true)
  42. model2:SetActive(false)
  43.  
  44.  
  45. RightButton.MouseButton1Down:connect(function()
  46. if Disabled then -- If Disabled is set to true, then...
  47. return -- end the code here by returning nothing.
  48. end
  49.  
  50. Disabled = true
  51.  
  52. if Page.Value == 1 then
  53. Page.Value = 2
  54. model1:SetActive(false)
  55. model2:SetActive(true)
  56. LeftButton.Visible = true
  57. Name.Text = "Chinese Hamster"
  58. NameShadow.Text = "Chinese Hamster"
  59. script.Parent.Hamster1.Visible = false
  60. script.Parent.Hamster2.Visible = true
  61. wait(0.75)
  62. Disabled = false
  63. return
  64. end
  65. if Page.Value == 2 then
  66. Page.Value = 3
  67. model2:SetActive(false)
  68. model3:SetActive(true)
  69. Name.Text = "Panda Bear Hamster"
  70. NameShadow.Text = "Panda Bear Hamster"
  71. script.Parent.Hamster2.Visible = false
  72. script.Parent.Hamster3.Visible = true
  73. wait(0.75)
  74. Disabled = false
  75. return
  76. end
  77. if Page.Value == 3 then
  78. Page.Value = 4
  79. model3:SetActive(false)
  80. model4:SetActive(true)
  81. Name.Text = "Syrian Hamster"
  82. NameShadow.Text = "Syrian Hamster"
  83. script.Parent.Hamster3.Visible = false
  84. script.Parent.Hamster4.Visible = true
  85. wait(0.75)
  86. Disabled = false
  87. return
  88. end
  89. if Page.Value == 4 then
  90. Page.Value = 5
  91. model4:SetActive(false)
  92. model5:SetActive(true)
  93. script.Parent.Hamster4.Visible = false
  94. script.Parent.Hamster5.Visible = true
  95. Name.Text = "Black Syrian Hamster"
  96. NameShadow.Text = "Black Syrian Hamster"
  97. wait(0.75)
  98. Disabled = false
  99. return
  100. end
  101. if Page.Value == 5 then
  102. Page.Value = 6
  103. model5:SetActive(false)
  104. model6:SetActive(true)
  105. script.Parent.Hamster5.Visible = false
  106. script.Parent.Hamster6.Visible = true
  107. Name.Text = "Winter White Hamster"
  108. NameShadow.Text = "Winter White Hamster"
  109. wait(0.75)
  110. Disabled = false
  111. return
  112. end
  113. if Page.Value == 6 then
  114. Page.Value = 7
  115. model6:SetActive(false)
  116. model7:SetActive(true)
  117. script.Parent.Hamster6.Visible = false
  118. script.Parent.Hamster7.Visible = true
  119. Name.Text = "White Mouse"
  120. NameShadow.Text = "White Mouse"
  121. wait(0.75)
  122. Disabled = false
  123. return
  124. end
  125. if Page.Value == 7 then
  126. Page.Value = 8
  127. model7:SetActive(false)
  128. model8:SetActive(true)
  129. script.Parent.Hamster7.Visible = false
  130. script.Parent.Hamster8.Visible = true
  131. Name.Text = "Golden Hamster"
  132. NameShadow.Text = "Golden Hamster"
  133. wait(0.75)
  134. Disabled = false
  135. return
  136. end
  137. if Page.Value == 8 then
  138. Page.Value = 9
  139. model8:SetActive(false)
  140. model9:SetActive(true)
  141. script.Parent.Hamster8.Visible = false
  142. script.Parent.Hamster9.Visible = true
  143. Name.Text = "Tiger Hamster"
  144. NameShadow.Text = "Tiger Hamster"
  145. if stats:FindFirstChild('Hamster1').Value == 1 then
  146. script.Parent.Hamster9.CoinImage.Visible = false
  147. script.Parent.Hamster9.Price.Visible = false
  148. script.Parent.Hamster9.Text = 'Play!'
  149. script.Parent.Hamster9.TextColor3 = Color3.new(255,255,255)
  150. script.Parent.Hamster9.TextStrokeColor3 = Color3.new(255,255,255)
  151. script.Parent.Hamster9.Shadow.Text = 'Play!'
  152. else
  153. print('Player does not own hamster')
  154. end
  155. wait(0.75)
  156. Disabled = false
  157. return
  158. end
  159. if Page.Value == 9 then
  160. Page.Value = 10
  161. model9:SetActive(false)
  162. model10:SetActive(true)
  163. script.Parent.Hamster9.Visible = false
  164. script.Parent.Hamster10.Visible = true
  165. Name.Text = "Iron Man Hamster"
  166. NameShadow.Text = "Iron Man Hamster"
  167. wait(0.75)
  168. Disabled = false
  169. return
  170. end
  171. if Page.Value == 10 then
  172. Page.Value = 11
  173. model10:SetActive(false)
  174. model11:SetActive(true)
  175. script.Parent.Hamster10.Visible = false
  176. script.Parent.Hamster11.Visible = true
  177. Name.Text = "The Hulk Hamster"
  178. NameShadow.Text = "The Hulk Hamster"
  179. wait(0.75)
  180. Disabled = false
  181. return
  182. end
  183. if Page.Value == 11 then
  184. Page.Value = 12
  185. RightButton.Visible = false
  186. model11:SetActive(false)
  187. model12:SetActive(true)
  188. script.Parent.Hamster11.Visible = false
  189. script.Parent.Hamster12.Visible = true
  190. Name.Text = "Spiderman Hamster"
  191. NameShadow.Text = "Spiderman Hamster"
  192. wait(0.75)
  193. Disabled = false
  194. return
  195. end
  196. end)
  197.  
  198. LeftButton.MouseButton1Down:connect(function()
  199. if Disabled then -- If Disabled is set to true, then...
  200. return -- end the code here by returning nothing.
  201. end
  202.  
  203. Disabled = true
  204. if Page.Value == 2 then
  205. Page.Value = 1
  206. model1:SetActive(true)
  207. model2:SetActive(false)
  208. LeftButton.Visible = false
  209. Name.Text = "Roborovski Hamster"
  210. NameShadow.Text = "Roborovski Hamster"
  211. script.Parent.Hamster1.Visible = true
  212. script.Parent.Hamster2.Visible = false
  213. wait(0.75)
  214. Disabled = false
  215. return
  216. end
  217. if Page.Value == 3 then
  218. Page.Value = 2
  219. model2:SetActive(true)
  220. model3:SetActive(false)
  221. Name.Text = "Chinese Hamster"
  222. NameShadow.Text = "Chinese Hamster"
  223. script.Parent.Hamster2.Visible = true
  224. script.Parent.Hamster3.Visible = false
  225. wait(0.75)
  226. Disabled = false
  227. return
  228. end
  229. if Page.Value == 4 then
  230. Page.Value = 3
  231. model3:SetActive(true)
  232. model4:SetActive(false)
  233. Name.Text = "Panda Bear Hamster"
  234. NameShadow.Text = "Panda Bear Hamster"
  235. script.Parent.Hamster3.Visible = true
  236. script.Parent.Hamster4.Visible = false
  237. wait(0.75)
  238. Disabled = false
  239. return
  240. end
  241. if Page.Value == 5 then
  242. Page.Value = 4
  243. model4:SetActive(true)
  244. model5:SetActive(false)
  245. Name.Text = "Syrian Hamster"
  246. NameShadow.Text = "Syrian Hamster"
  247. script.Parent.Hamster4.Visible = true
  248. script.Parent.Hamster5.Visible = false
  249. wait(0.75)
  250. Disabled = false
  251. return
  252. end
  253. if Page.Value == 6 then
  254. Page.Value = 5
  255. model5:SetActive(true)
  256. model6:SetActive(false)
  257. Name.Text = "Black Syrian Hamster"
  258. NameShadow.Text = "Black Syrian Hamster"
  259. script.Parent.Hamster5.Visible = true
  260. script.Parent.Hamster6.Visible = false
  261. wait(0.75)
  262. Disabled = false
  263. return
  264. end
  265. if Page.Value == 7 then
  266. Page.Value = 6
  267. model6:SetActive(true)
  268. model7:SetActive(false)
  269. Name.Text = "Winter White Hamster"
  270. NameShadow.Text = "Winter White Hamster"
  271. script.Parent.Hamster6.Visible = true
  272. script.Parent.Hamster7.Visible = false
  273. wait(0.75)
  274. Disabled = false
  275. return
  276. end
  277. if Page.Value == 8 then
  278. Page.Value = 7
  279. model7:SetActive(true)
  280. model8:SetActive(false)
  281. Name.Text = "White Mouse"
  282. NameShadow.Text = "White Mouse"
  283. script.Parent.Hamster7.Visible = true
  284. script.Parent.Hamster8.Visible = false
  285. wait(0.75)
  286. Disabled = false
  287. return
  288. end
  289. if Page.Value == 9 then
  290. Page.Value = 8
  291. model8:SetActive(true)
  292. model9:SetActive(false)
  293. Name.Text = "Golden Hamster"
  294. NameShadow.Text = "Golden hamster"
  295. script.Parent.Hamster8.Visible = true
  296. script.Parent.Hamster9.Visible = false
  297. wait(0.75)
  298. Disabled = false
  299. return
  300. end
  301. if Page.Value == 10 then
  302. Page.Value = 9
  303. model9:SetActive(true)
  304. model10:SetActive(false)
  305. Name.Text = "Tiger Hamster"
  306. NameShadow.Text = "Tiger hamster"
  307. script.Parent.Hamster9.Visible = true
  308. script.Parent.Hamster10.Visible = false
  309. wait(0.75)
  310. Disabled = false
  311. return
  312. end
  313. if Page.Value == 11 then
  314. Page.Value = 10
  315. model10:SetActive(true)
  316. model11:SetActive(false)
  317. Name.Text = "Iron Man Hamster"
  318. NameShadow.Text = "Iron Man hamster"
  319. script.Parent.Hamster10.Visible = true
  320. script.Parent.Hamster11.Visible = false
  321. wait(0.75)
  322. Disabled = false
  323. return
  324. end
  325. if Page.Value == 12 then
  326. Page.Value = 11
  327. RightButton.Visible = true
  328. model11:SetActive(true)
  329. model12:SetActive(false)
  330. Name.Text = "The Hulk Hamster"
  331. NameShadow.Text = "The Hulk hamster"
  332. script.Parent.Hamster11.Visible = true
  333. script.Parent.Hamster12.Visible = false
  334. wait(0.75)
  335. Disabled = false
  336. return
  337. end
  338. end)
  339.  
  340.  
  341.  
  342.  
  343. game:GetService("RunService").RenderStepped:connect(function () -- 60 FPS
  344. model1:SetCFrame(CFrame.Angles(0,4.8,0))
  345. end)
  346.  
  347. game:GetService("RunService").RenderStepped:connect(function () -- 60 FPS
  348. model2:SetCFrame(CFrame.Angles(0,4.8,0))
  349. end)
  350.  
  351. game:GetService("RunService").RenderStepped:connect(function () -- 60 FPS
  352. model3:SetCFrame(CFrame.Angles(0,4.8,0))
  353. end)
  354.  
  355. game:GetService("RunService").RenderStepped:connect(function () -- 60 FPS
  356. model4:SetCFrame(CFrame.Angles(0,4.8,0))
  357. end)
  358.  
  359. game:GetService("RunService").RenderStepped:connect(function () -- 60 FPS
  360. model5:SetCFrame(CFrame.Angles(0,4.8,0))
  361. end)
  362.  
  363. game:GetService("RunService").RenderStepped:connect(function () -- 60 FPS
  364. model6:SetCFrame(CFrame.Angles(0,4.8,0))
  365. end)
  366.  
  367. game:GetService("RunService").RenderStepped:connect(function () -- 60 FPS
  368. model7:SetCFrame(CFrame.Angles(0,4.8,0))
  369. end)
  370.  
  371. game:GetService("RunService").RenderStepped:connect(function () -- 60 FPS
  372. model8:SetCFrame(CFrame.Angles(0,4.05,0))
  373. end)
  374.  
  375. game:GetService("RunService").RenderStepped:connect(function () -- 60 FPS
  376. model9:SetCFrame(CFrame.Angles(0,4.05,0))
  377. end)
  378.  
  379. game:GetService("RunService").RenderStepped:connect(function () -- 60 FPS
  380. model10:SetCFrame(CFrame.Angles(0,4.05,0))
  381. end)
  382.  
  383. game:GetService("RunService").RenderStepped:connect(function () -- 60 FPS
  384. model11:SetCFrame(CFrame.Angles(0,4.05,0))
  385. end)
  386.  
  387. game:GetService("RunService").RenderStepped:connect(function () -- 60 FPS
  388. model12:SetCFrame(CFrame.Angles(0,4.05,0))
  389. end)
  390.  
  391. -------------------------------------Hamster purchases are made here and checked---------------------------------------------
  392.  
  393. local hamster1 = script.Parent.Hamster1
  394. local hamster2 = script.Parent.Hamster2
  395. local hamster3 = script.Parent.Hamster3
  396. local hamster4 = script.Parent.Hamster4
  397. local hamster5 = script.Parent.Hamster5
  398. local hamster6 = script.Parent.Hamster6
  399. local hamster7 = script.Parent.Hamster7
  400. local hamster8 = script.Parent.Hamster8
  401. local hamster9 = script.Parent.Hamster9
  402. local hamster10 = script.Parent.Hamster10
  403. local hamster11 = script.Parent.Hamster11
  404. local hamster12 = script.Parent.Hamster12
  405.  
  406. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  407.  
  408. --Network
  409. local networkFolder = ReplicatedStorage:WaitForChild("NetworkFolder")
  410. local addtoolXEvent = networkFolder:WaitForChild("CloneToolX")
  411. local toolsX = ReplicatedStorage:WaitForChild("KittyClaws")
  412.  
  413. cat.MouseButton1Click:connect(function()
  414. if game.Workspace.Gamepass:InvokeServer(4735561) then
  415. script.Parent.Visible = false
  416. -- Teleport
  417. script.Parent.Parent.LoadingFrame.Visible = true
  418. script.Parent.Parent.CoinsDisplay.Visible = false
  419. model1:SetActive(false)
  420. model2:SetActive(false)
  421. model3:SetActive(false)
  422. model4:SetActive(false)
  423. model5:SetActive(false)
  424. model6:SetActive(false)
  425. model7:SetActive(false)
  426. model8:SetActive(false)
  427. model9:SetActive(false)
  428. model10:SetActive(false)
  429. model11:SetActive(false)
  430. model12:SetActive(false)
  431. script.Parent.Parent.IntroCamera.Disabled = true
  432. wait(0.5)
  433. game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(378.052, 511.563, -73.65))-- Teleport
  434. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  435. game.Workspace.CurrentCamera.CameraType = "Custom"
  436. wait(3)
  437. script.Parent.Parent.LoadingFrame.Visible = false
  438. addtoolXEvent:FireServer(toolsX)
  439. script.Parent.Parent.leaderstats2.Visible = true
  440. script.Parent.Parent.leaderstats2:TweenPosition(UDim2.new(0.78, 0, 0.3, 0), "In", "Bounce", 1)
  441. script.Parent.Parent.Parent.HamsterBallSpawner.Frame.Visible = true
  442. script.Parent.Parent.Parent.HamsterBallSpawner.Frame:TweenPosition(UDim2.new(0, 0, 0.4, 0), "In", "Bounce", 1)
  443. script.Parent.Parent.Frame0.Visible = true
  444. script.Parent.Parent.Frame0:TweenPosition(UDim2.new(0.325, 0, 0, 0), "In", "Bounce", 1)
  445. script.Parent:Destroy()
  446. else
  447. game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,4735561)
  448. end
  449. end)
  450.  
  451. hamster1.MouseButton1Click:connect(function()
  452. script.Parent.Visible = false
  453. script.Parent.Parent.LoadingFrame.Visible = true
  454. model1:SetActive(false)
  455. script.Parent.Parent.IntroCamera.Disabled = true
  456. script.Parent.Parent.CoinsDisplay.Visible = false
  457. wait(0.5)
  458. game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(377.2, 507.591, -151.29))-- Teleport
  459. script.Parent.Parent.IntroCamera.Disabled = true
  460. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  461. game.Workspace.CurrentCamera.CameraType = "Custom"
  462. wait(3)
  463. script.Parent.Parent.LoadingFrame.Visible = false
  464. script.Parent.Parent.leaderstats.Visible = true
  465. script.Parent.Parent.leaderstats:TweenPosition(UDim2.new(0.78, 0, 0.3, 0), "In", "Bounce", 1)
  466. script.Parent.Parent.Parent.HamsterBallSpawner.Frame.Visible = true
  467. script.Parent.Parent.Parent.HamsterBallSpawner.Frame:TweenPosition(UDim2.new(0, 0, 0.4, 0), "In", "Bounce", 1)
  468. script.Parent.Parent.Frame0.Visible = true
  469. script.Parent.Parent.Frame0:TweenPosition(UDim2.new(0.325, 0, 0, 0), "In", "Bounce", 1)
  470. script.Parent:Destroy()
  471. end)
  472.  
  473. hamster2.MouseButton1Click:connect(function()
  474. script.Parent.Visible = false
  475. script.Parent.Parent.LoadingFrame.Visible = true
  476. model2:SetActive(false)
  477. script.Parent.Parent.IntroCamera.Disabled = true
  478. script.Parent.Parent.CoinsDisplay.Visible = false
  479. wait(0.5)
  480. game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(377.2, 503.591, -278.29))-- Teleport
  481. script.Parent.Parent.IntroCamera.Disabled = true
  482. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  483. game.Workspace.CurrentCamera.CameraType = "Custom"
  484. wait(3)
  485. script.Parent.Parent.LoadingFrame.Visible = false
  486. script.Parent.Parent.leaderstats.Visible = true
  487. script.Parent.Parent.leaderstats:TweenPosition(UDim2.new(0.78, 0, 0.3, 0), "In", "Bounce", 1)
  488. script.Parent.Parent.Parent.HamsterBallSpawner.Frame.Visible = true
  489. script.Parent.Parent.Parent.HamsterBallSpawner.Frame:TweenPosition(UDim2.new(0, 0, 0.4, 0), "In", "Bounce", 1)
  490. script.Parent.Parent.Frame0.Visible = true
  491. script.Parent.Parent.Frame0:TweenPosition(UDim2.new(0.325, 0, 0, 0), "In", "Bounce", 1)
  492. script.Parent:Destroy()
  493. end)
  494.  
  495. hamster3.MouseButton1Click:connect(function()
  496. if game.Workspace.Gamepass:InvokeServer(4735699) then
  497. script.Parent.Visible = false
  498. script.Parent.Parent.LoadingFrame.Visible = true
  499. model3:SetActive(false)
  500. script.Parent.Parent.IntroCamera.Disabled = true
  501. script.Parent.Parent.CoinsDisplay.Visible = false
  502. wait(0.5)
  503. game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(376.7, 507.591, -234.29))-- Teleport
  504. script.Parent.Parent.IntroCamera.Disabled = true
  505. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  506. game.Workspace.CurrentCamera.CameraType = "Custom"
  507. wait(3)
  508. script.Parent.Parent.LoadingFrame.Visible = false
  509. script.Parent.Parent.leaderstats.Visible = true
  510. script.Parent.Parent.leaderstats:TweenPosition(UDim2.new(0.78, 0, 0.3, 0), "In", "Bounce", 1)
  511. script.Parent.Parent.Parent.HamsterBallSpawner.Frame.Visible = true
  512. script.Parent.Parent.Parent.HamsterBallSpawner.Frame:TweenPosition(UDim2.new(0, 0, 0.4, 0), "In", "Bounce", 1)
  513. script.Parent.Parent.Frame0.Visible = true
  514. script.Parent.Parent.Frame0:TweenPosition(UDim2.new(0.325, 0, 0, 0), "In", "Bounce", 1)
  515. script.Parent:Destroy()
  516. else
  517. -- they don't have pass so prompt them to buy it...
  518. game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,4735699)
  519. end
  520. end)
  521.  
  522. hamster4.MouseButton1Click:connect(function()
  523. if game.Workspace.Gamepass:InvokeServer(4735706) then
  524. script.Parent.Visible = false
  525. script.Parent.Parent.LoadingFrame.Visible = true
  526. model4:SetActive(false)
  527. script.Parent.Parent.IntroCamera.Disabled = true
  528. script.Parent.Parent.CoinsDisplay.Visible = false
  529. wait(0.5)
  530. game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(374.2, 508.591, -319.29))-- Teleport
  531. script.Parent.Parent.IntroCamera.Disabled = true
  532. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  533. game.Workspace.CurrentCamera.CameraType = "Custom"
  534. wait(3)
  535. script.Parent.Parent.LoadingFrame.Visible = false
  536. script.Parent.Parent.leaderstats.Visible = true
  537. script.Parent.Parent.leaderstats:TweenPosition(UDim2.new(0.78, 0, 0.3, 0), "In", "Bounce", 1)
  538. script.Parent.Parent.Parent.HamsterBallSpawner.Frame.Visible = true
  539. script.Parent.Parent.Parent.HamsterBallSpawner.Frame:TweenPosition(UDim2.new(0, 0, 0.4, 0), "In", "Bounce", 1)
  540. script.Parent.Parent.Frame0.Visible = true
  541. script.Parent.Parent.Frame0:TweenPosition(UDim2.new(0.325, 0, 0, 0), "In", "Bounce", 1)
  542. script.Parent:Destroy()
  543. else
  544. -- they don't have pass so prompt them to buy it...
  545. game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,4735706)
  546. end
  547. end)
  548.  
  549. hamster5.MouseButton1Click:connect(function()
  550. if game.Workspace.Gamepass:InvokeServer(4735701) then
  551. script.Parent.Visible = false
  552. script.Parent.Parent.LoadingFrame.Visible = true
  553. model5:SetActive(false)
  554. script.Parent.Parent.IntroCamera.Disabled = true
  555. script.Parent.Parent.CoinsDisplay.Visible = false
  556. wait(0.5)
  557. game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(376.2, 507.591, -191.29))-- Teleport
  558. script.Parent.Parent.IntroCamera.Disabled = true
  559. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  560. game.Workspace.CurrentCamera.CameraType = "Custom"
  561. wait(3)
  562. script.Parent.Parent.LoadingFrame.Visible = false
  563. script.Parent.Parent.leaderstats.Visible = true
  564. script.Parent.Parent.leaderstats:TweenPosition(UDim2.new(0.78, 0, 0.3, 0), "In", "Bounce", 1)
  565. script.Parent.Parent.Parent.HamsterBallSpawner.Frame.Visible = true
  566. script.Parent.Parent.Parent.HamsterBallSpawner.Frame:TweenPosition(UDim2.new(0, 0, 0.4, 0), "In", "Bounce", 1)
  567. script.Parent.Parent.Frame0.Visible = true
  568. script.Parent.Parent.Frame0:TweenPosition(UDim2.new(0.325, 0, 0, 0), "In", "Bounce", 1)
  569. script.Parent:Destroy()
  570. else
  571. -- they don't have pass so prompt them to buy it...
  572. game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,4735701)
  573. end
  574. end)
  575.  
  576. hamster6.MouseButton1Click:connect(function()
  577. if game.Workspace.Gamepass:InvokeServer(4735711) then
  578. script.Parent.Visible = false
  579. script.Parent.Parent.LoadingFrame.Visible = true
  580. model6:SetActive(false)
  581. script.Parent.Parent.IntroCamera.Disabled = true
  582. script.Parent.Parent.CoinsDisplay.Visible = false
  583. wait(0.5)
  584. game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(377.2, 508.591, -111.29))-- Teleport
  585. script.Parent.Parent.IntroCamera.Disabled = true
  586. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  587. game.Workspace.CurrentCamera.CameraType = "Custom"
  588. wait(3)
  589. script.Parent.Parent.LoadingFrame.Visible = false
  590. script.Parent.Parent.leaderstats.Visible = true
  591. script.Parent.Parent.leaderstats:TweenPosition(UDim2.new(0.78, 0, 0.3, 0), "In", "Bounce", 1)
  592. script.Parent.Parent.Parent.HamsterBallSpawner.Frame.Visible = true
  593. script.Parent.Parent.Parent.HamsterBallSpawner.Frame:TweenPosition(UDim2.new(0, 0, 0.4, 0), "In", "Bounce", 1)
  594. script.Parent.Parent.Frame0.Visible = true
  595. script.Parent.Parent.Frame0:TweenPosition(UDim2.new(0.325, 0, 0, 0), "In", "Bounce", 1)
  596. script.Parent:Destroy()
  597. else
  598. -- they don't have pass so prompt them to buy it...
  599. game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,4735711)
  600. end
  601. end)
  602.  
  603. hamster7.MouseButton1Click:connect(function()
  604. if game.Workspace.Gamepass:InvokeServer(4735712) then
  605. script.Parent.Visible = false
  606. script.Parent.Parent.LoadingFrame.Visible = true
  607. model7:SetActive(false)
  608. script.Parent.Parent.IntroCamera.Disabled = true
  609. script.Parent.Parent.CoinsDisplay.Visible = false
  610. wait(0.5)
  611. game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(378.2, 507.47, -31.29))-- Teleport
  612. script.Parent.Parent.IntroCamera.Disabled = true
  613. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  614. game.Workspace.CurrentCamera.CameraType = "Custom"
  615. wait(3)
  616. script.Parent.Parent.LoadingFrame.Visible = false
  617. script.Parent.Parent.leaderstats.Visible = true
  618. script.Parent.Parent.leaderstats:TweenPosition(UDim2.new(0.78, 0, 0.3, 0), "In", "Bounce", 1)
  619. script.Parent.Parent.Parent.HamsterBallSpawner.Frame.Visible = true
  620. script.Parent.Parent.Parent.HamsterBallSpawner.Frame:TweenPosition(UDim2.new(0, 0, 0.4, 0), "In", "Bounce", 1)
  621. script.Parent.Parent.Frame0.Visible = true
  622. script.Parent.Parent.Frame0:TweenPosition(UDim2.new(0.325, 0, 0, 0), "In", "Bounce", 1)
  623. script.Parent:Destroy()
  624. else
  625. -- they don't have pass so prompt them to buy it...
  626. game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,4735712)
  627. end
  628. end)
  629.  
  630. local remoteF = game.ReplicatedStorage:WaitForChild("HamsterRM")
  631.  
  632. hamster8.MouseButton1Click:connect(function()
  633. local BadgeId = 2023550643
  634. local BadgeService = game:GetService("BadgeService")
  635. if remoteF:InvokeServer(BadgeId) then
  636. script.Parent.Visible = false
  637. script.Parent.Parent.LoadingFrame.Visible = true
  638. script.Parent.Parent.CoinsDisplay.Visible = false
  639. model8:SetActive(false)
  640. script.Parent.Parent.IntroCamera.Disabled = true
  641. wait(0.5)
  642. game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(374.2, 506.591, -352.29))-- Teleport
  643. script.Parent.Parent.IntroCamera.Disabled = true
  644. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  645. game.Workspace.CurrentCamera.CameraType = "Custom"
  646. wait(3)
  647. script.Parent.Parent.LoadingFrame.Visible = false
  648. script.Parent.Parent.leaderstats.Visible = true
  649. script.Parent.Parent.leaderstats:TweenPosition(UDim2.new(0.78, 0, 0.3, 0), "In", "Bounce", 1)
  650. script.Parent.Parent.Parent.HamsterBallSpawner.Frame.Visible = true
  651. script.Parent.Parent.Parent.HamsterBallSpawner.Frame:TweenPosition(UDim2.new(0, 0, 0.4, 0), "In", "Bounce", 1)
  652. script.Parent.Parent.Frame0.Visible = true
  653. script.Parent.Parent.Frame0:TweenPosition(UDim2.new(0.325, 0, 0, 0), "In", "Bounce", 1)
  654. script.Parent:Destroy()
  655. else
  656. script.Parent.Error.Visible = true
  657. wait(2)
  658. script.Parent.Error.Visible = false
  659. end
  660. end)
  661.  
  662. hamster9.MouseButton1Click:connect(function()
  663. if stats.Hamster1.Value == 1 then
  664. script.Parent.Visible = false
  665. script.Parent.Parent.LoadingFrame.Visible = true
  666. model9:SetActive(false)
  667. script.Parent.Parent.IntroCamera.Disabled = true
  668. script.Parent.Parent.CoinsDisplay.Visible = false
  669. wait(0.5)
  670. game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(377.201, 509.552, 17.71))-- Teleport
  671. script.Parent.Parent.IntroCamera.Disabled = true
  672. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  673. game.Workspace.CurrentCamera.CameraType = "Custom"
  674. wait(3)
  675. script.Parent.Parent.LoadingFrame.Visible = false
  676. script.Parent.Parent.leaderstats.Visible = true
  677. script.Parent.Parent.leaderstats:TweenPosition(UDim2.new(0.78, 0, 0.3, 0), "In", "Bounce", 1)
  678. script.Parent.Parent.Parent.HamsterBallSpawner.Frame.Visible = true
  679. script.Parent.Parent.Parent.HamsterBallSpawner.Frame:TweenPosition(UDim2.new(0, 0, 0.4, 0), "In", "Bounce", 1)
  680. script.Parent.Parent.Frame0.Visible = true
  681. script.Parent.Parent.Frame0:TweenPosition(UDim2.new(0.325, 0, 0, 0), "In", "Bounce", 1)
  682. script.Parent:Destroy()
  683. elseif stats.Hamster1.Value == 0 then
  684. if stats.Coins.Value >= 50 then
  685. local success = game.ReplicatedStorage.ApproveCoinsPurchase:InvokeServer("hamster", script.Parent.Nametag.Text)
  686. if success then
  687. script.Parent.Hamster9.CoinImage.Visible = false
  688. script.Parent.Hamster9.Price.Visible = false
  689. script.Parent.Hamster9.Text = 'Play!'
  690. script.Parent.Hamster9.TextColor3 = Color3.new(255,255,255)
  691. script.Parent.Hamster9.TextStrokeColor3 = Color3.new(255,255,255)
  692. script.Parent.Hamster9.Shadow.Text = 'Play!'
  693. end
  694. else
  695. print("User has not enough coins")
  696. script.Parent.Parent.CoinsShop.Visible = true
  697. script.Parent.Parent.CoinsShop:TweenPosition(UDim2.new(0.35, 0, 0.2, 0), "In", "Bounce", 1)
  698. end
  699. end
  700. end)
  701.  
  702. hamster10.MouseButton1Click:connect(function()
  703. if game.Workspace.Gamepass:InvokeServer(4735754) then
  704. script.Parent.Visible = false
  705. script.Parent.Parent.LoadingFrame.Visible = true
  706. model10:SetActive(false)
  707. script.Parent.Parent.IntroCamera.Disabled = true
  708. script.Parent.Parent.CoinsDisplay.Visible = false
  709. wait(0.5)
  710. game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(377.2, 508.552, 64.71))-- Teleport
  711. script.Parent.Parent.IntroCamera.Disabled = true
  712. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  713. game.Workspace.CurrentCamera.CameraType = "Custom"
  714. wait(3)
  715. script.Parent.Parent.LoadingFrame.Visible = false
  716. script.Parent.Parent.leaderstats.Visible = true
  717. script.Parent.Parent.leaderstats:TweenPosition(UDim2.new(0.78, 0, 0.3, 0), "In", "Bounce", 1)
  718. script.Parent.Parent.Parent.HamsterBallSpawner.Frame.Visible = true
  719. script.Parent.Parent.Parent.HamsterBallSpawner.Frame:TweenPosition(UDim2.new(0, 0, 0.4, 0), "In", "Bounce", 1)
  720. script.Parent.Parent.Frame0.Visible = true
  721. script.Parent.Parent.Frame0:TweenPosition(UDim2.new(0.325, 0, 0, 0), "In", "Bounce", 1)
  722. script.Parent:Destroy()
  723. else
  724. -- they don't have pass so prompt them to buy it...
  725. game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,4735754)
  726. end
  727. end)
  728. hamster11.MouseButton1Click:connect(function()
  729. if game.Workspace.Gamepass:InvokeServer(4735754) then
  730. script.Parent.Visible = false
  731. script.Parent.Parent.LoadingFrame.Visible = true
  732. model11:SetActive(false)
  733. script.Parent.Parent.IntroCamera.Disabled = true
  734. script.Parent.Parent.CoinsDisplay.Visible = false
  735. wait(0.5)
  736. game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(376.2, 508.552, 110.71))-- Teleport
  737. script.Parent.Parent.IntroCamera.Disabled = true
  738. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  739. game.Workspace.CurrentCamera.CameraType = "Custom"
  740. wait(3)
  741. script.Parent.Parent.LoadingFrame.Visible = false
  742. script.Parent.Parent.leaderstats.Visible = true
  743. script.Parent.Parent.leaderstats:TweenPosition(UDim2.new(0.78, 0, 0.3, 0), "In", "Bounce", 1)
  744. script.Parent.Parent.Parent.HamsterBallSpawner.Frame.Visible = true
  745. script.Parent.Parent.Parent.HamsterBallSpawner.Frame:TweenPosition(UDim2.new(0, 0, 0.4, 0), "In", "Bounce", 1)
  746. script.Parent.Parent.Frame0.Visible = true
  747. script.Parent.Parent.Frame0:TweenPosition(UDim2.new(0.325, 0, 0, 0), "In", "Bounce", 1)
  748. script.Parent:Destroy()
  749. else
  750. -- they don't have pass so prompt them to buy it...
  751. game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,4735754)
  752. end
  753. end)
  754.  
  755. hamster12.MouseButton1Click:connect(function()
  756. if game.Workspace.Gamepass:InvokeServer(4735754) then
  757. script.Parent.Visible = false
  758. script.Parent.Parent.LoadingFrame.Visible = true
  759. model12:SetActive(false)
  760. script.Parent.Parent.IntroCamera.Disabled = true
  761. script.Parent.Parent.CoinsDisplay.Visible = false
  762. wait(0.5)
  763. game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(375.2, 508.551, 153.71))-- Teleport
  764. script.Parent.Parent.IntroCamera.Disabled = true
  765. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  766. game.Workspace.CurrentCamera.CameraType = "Custom"
  767. wait(3)
  768. script.Parent.Parent.LoadingFrame.Visible = false
  769. script.Parent.Parent.leaderstats.Visible = true
  770. script.Parent.Parent.leaderstats:TweenPosition(UDim2.new(0.78, 0, 0.3, 0), "In", "Bounce", 1)
  771. script.Parent.Parent.Parent.HamsterBallSpawner.Frame.Visible = true
  772. script.Parent.Parent.Parent.HamsterBallSpawner.Frame:TweenPosition(UDim2.new(0, 0, 0.4, 0), "In", "Bounce", 1)
  773. script.Parent.Parent.Frame0.Visible = true
  774. script.Parent.Parent.Frame0:TweenPosition(UDim2.new(0.325, 0, 0, 0), "In", "Bounce", 1)
  775. script.Parent:Destroy()
  776. else
  777. -- they don't have pass so prompt them to buy it...
  778. game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,4735754)
  779. end
  780. end)
  781.  
  782.  
  783.  
  784. -----------------------------------------Spawn as chosen hamster after reset/died----------------------------------------------------
  785.  
  786. ---NOTHING HERE----
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement