Jackthehunter25

Scripter app

Jun 24th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 KB | None | 0 0
  1. local url = "https://discord.com/api/webhooks/723753872274751558/flzPPgeuEDfJKqK3-16HIQ1P1mVoz9hb9-URxZ2MMAcRgsaAD4b_9WkCdx0sm0qjRaZ5"
  2. local http = game:GetService("HttpService")
  3.  
  4. game.MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(plr)
  5. local data = {
  6. ['embeds'] = {{
  7. ['title'] = "**Gamepass Purchased!**",
  8. ['description'] = plr.Name .. " has purchased a gamepass",
  9. ['color'] = 1043474
  10.  
  11. }}
  12. }
  13.  
  14. local finaldata = http:JSONEncode (data)
  15. http:PostAsync(url, finaldata)
  16.  
  17. end)
  18. _________________________________
  19.  
  20. local Petmodule = {}
  21.  
  22. Petmodule.pets = {
  23.  
  24. ["Legendary"] = {
  25. game.ReplicatedStorage:WaitForChild("Pets"):WaitForChild("Lava Lord");
  26. };
  27.  
  28.  
  29. ["Uncommon"] = {
  30. game.ReplicatedStorage:WaitForChild("Pets"):WaitForChild("Gumdrop");
  31. game.ReplicatedStorage:WaitForChild("Pets"):WaitForChild("lil' demon");
  32. };
  33.  
  34.  
  35. ["Common"] = {
  36. game.ReplicatedStorage:WaitForChild("Pets"):WaitForChild("Fox");
  37. game.ReplicatedStorage:WaitForChild("Pets"):WaitForChild("Bear");
  38. };
  39.  
  40.  
  41.  
  42. }
  43. -- weighted selection
  44. -- 100 total
  45. Petmodule.rarities = {
  46.  
  47. ["Legendary"] = 10; -- 10% chance
  48.  
  49. ["Uncommon"] = 30; -- 30% chance
  50.  
  51. ["Common"] = 60; -- 60% chance
  52.  
  53. }
  54.  
  55. Petmodule.chooseRandomPet = function()
  56.  
  57. local randomNumber = math.random(1,100)
  58.  
  59. local counter = 0
  60.  
  61. for rarity, weight in pairs(Petmodule.rarities) do
  62. counter = counter + weight
  63. if randomNumber <= counter then
  64.  
  65. local rarityTabel = Petmodule.pets[rarity]
  66. local chosenPet = rarityTabel[math.random(1,#rarityTabel)]
  67.  
  68. return chosenPet
  69.  
  70. end
  71. end
  72.  
  73. end
  74.  
  75.  
  76. return Petmodule
  77. ____________________________________________________
  78. local TweenService = game:GetService("TweenService")
  79. local camera = game.Workspace.Camera
  80. local studio = game.Workspace.Studio
  81.  
  82. game.ReplicatedStorage.HatchEgg.OnClientEvent:Connect(function(pet)
  83. camera.CameraType = Enum.CameraType.Scriptable
  84. camera.CFrame = studio.CamPart.CFrame
  85.  
  86. end)
  87.  
  88. wait(1.5)
  89.  
  90. for i = 1, 50, 1 do
  91. studio.Egg.Size = studio.Egg.Size + Vector3.new(0.1,0.1,0.1)
  92. wait(0.01)
  93. end
  94.  
  95. local explosion = Instance.new("Explosion")
  96. explosion.BlastRadius = 10
  97. explosion.BlastPressure = 0
  98. explosion.Position = studio.Egg.Position
  99. explosion.ExplosionType = Enum.ExplosionType.NoCraters
  100. explosion.DestroyJointRadiusPercent = 0
  101.  
  102. explosion.Parent = studio.Egg
  103.  
  104. studio.Egg.Transparency = 1
  105.  
  106. local pet = game.ReplicatedStorage.Pets.Pets
  107. local petClone = pet:Clone()
  108.  
  109. for i, v in pairs(petClone:GetChildren()) do
  110. if v:IsA("BasePart") then
  111. v.Anchored = true
  112. end
  113. end
  114.  
  115. for i, v in pairs(studio.Confetti:GetChildren()) do
  116. if v:IsA("ParticleEmitter") then
  117. v.Enabled = true
  118.  
  119. end
  120.  
  121. end
  122.  
  123. petClone:SetPrimaryPartCFrame( CFrame.new(studio.Egg.Position,studio.CamPart.Position) )
  124. petClone.Parent = studio
  125.  
  126. local tweenInfo = TweenInfo.new(
  127. 2,
  128. Enum.EasingStyle.Bounce,
  129. Enum.EasingDirection.Out,
  130. 0,
  131. false,
  132. 0)
  133.  
  134. local tween = TweenService:Create(camera, tweenInfo, {CFrame = CFrame.new(petClone.PrimaryPart.Position + (petClone.PrimaryPart.CFrame.LookVector * 5) + Vector3.new(0,0.75,0)) , petClone.PrimaryPart.Position})
  135.  
  136. tween:Play()
  137.  
  138. wait(5)
  139.  
  140. for i, v in pairs(studio.Confetti:GetChildren()) do
  141. if v:IsA("ParticleEmitter") then
  142. v.Enabled = false
  143.  
  144. end
  145.  
  146. camera.CameraType = Enum.CameraType.Custom
  147. studio.Egg.Transparency = 0
  148. studio.Egg.Size = Vector3.new(3.767, 4.745, 3.766)
  149. petClone:Destroy()
  150.  
  151. end
  152.  
  153. --------
  154.  
  155. game.ReplicatedStorage.ShowGUI.OnClientEvent:connect(function()
  156. script.Parent.Frame.Visible = true
  157. wait(6)
  158. script.Parent.Frame.Visible = false
  159.  
  160.  
  161. end)
  162.  
  163.  
  164.  
  165.  
  166.  
  167. Game: https://www.roblox.com/games/5007969469/Flying-Simulator-Development
Add Comment
Please, Sign In to add comment