Advertisement
UhhLegoboy

Pokemon Trainer - Red!

Feb 14th, 2017
519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.83 KB | None | 0 0
  1. wait(0.001)
  2. plr = game.Players.LocalPlayer
  3. char = plr.Character
  4.  
  5. --Clothes
  6. Shirt = Instance.new("Shirt", char)
  7. Shirt.ShirtTemplate = "rbxassetid://209814545"
  8. Pants = Instance.new("Pants", char)
  9. Pants.PantsTemplate = "rbxassetid://511514565"
  10.  
  11. for _, child in pairs(char:GetChildren()) do
  12.     if child.ClassName == 'Accessory' then
  13.         child:Destroy()
  14.     end
  15. end
  16. for _, child in pairs(char:GetChildren()) do
  17.     if child.ClassName == 'ShirtGraphic' then
  18.         child:Destroy()
  19.     end
  20. end
  21. debounce = false
  22.         h = Instance.new("Accessory")
  23.         p = Instance.new("Part")
  24.         h.Name = "Go, Squirtle!"
  25.         p.Parent = h
  26.         p.Position = char:findFirstChild("Head").Position
  27.         p.Name = "Handle"
  28.         p.formFactor = 0
  29.         p.Size = Vector3.new(2, 1, 2)
  30.         p.BottomSurface = 0
  31.         p.TopSurface = 0
  32.         p.Locked = true
  33.         Hat = Instance.new("SpecialMesh", p)
  34.         Hat.MeshId = "http://www.roblox.com/asset/?id=16190497"
  35.         Hat.TextureId = "http://www.roblox.com/asset/?id=45783424"
  36.         h.Parent = char
  37.         h.AttachmentForward = Vector3.new (0, 0, -1)
  38.         h.AttachmentPos = Vector3.new(0, -0.2, -0.002)
  39.         h.AttachmentRight = Vector3.new (1, 0, 0)
  40.         h.AttachmentUp = Vector3.new (0, 1, 0)
  41.         wait(0.01)
  42.         debounce = true
  43.  
  44. char.Head.face.Texture = "rbxassetid://19398553"
  45.  
  46. --Pokeball
  47. Tool = Instance.new("Tool", char)
  48. Tool.Name = "Pokeball"
  49. Handle = Instance.new("Part", Tool)
  50. Handle.Name = "Handle"
  51. Handle.Size = Vector3.new(1,1,1)
  52. Mesh = Instance.new("SpecialMesh", Handle)
  53. Mesh.MeshId = "rbxassetid://430219314"
  54. Mesh.TextureId = "rbxassetid://430219325"
  55. Mesh.Scale = Vector3.new(0.2,0.2,0.2)
  56.  
  57. --Mouse
  58. local mouse = game.Players.LocalPlayer:GetMouse()
  59. mouse.Icon = "http://www.roblox.com/asset?id=273146939"
  60.  
  61. --Entire Battle Scenario!!!
  62. local runDummyScript = function(f,scri)
  63. local oldenv = getfenv(f)
  64. local newenv = setmetatable({}, {
  65. __index = function(_, k)
  66. if k:lower() == 'script' then
  67. return scri
  68. else
  69. return oldenv[k]
  70. end
  71. end
  72. })
  73. setfenv(f, newenv)
  74. ypcall(function() f() end)
  75. end
  76. cors = {}
  77. mas = Instance.new("Model",game:GetService("Lighting"))
  78. mas.Name = "CompiledModel"
  79. o1 = Instance.new("Model")
  80. o2 = Instance.new("Part")
  81. o3 = Instance.new("Part")
  82. o4 = Instance.new("Decal")
  83. o5 = Instance.new("Decal")
  84. o6 = Instance.new("Part")
  85. o7 = Instance.new("Sound")
  86. o8 = Instance.new("Script")
  87. o9 = Instance.new("Part")
  88. o10 = Instance.new("SurfaceGui")
  89. o11 = Instance.new("TextButton")
  90. o12 = Instance.new("ClickDetector")
  91. o13 = Instance.new("Script")
  92. o14 = Instance.new("Sound")
  93. o15 = Instance.new("Part")
  94. o16 = Instance.new("Decal")
  95. o17 = Instance.new("Decal")
  96. o1.Parent = mas
  97. o2.Parent = o1
  98. o2.Material = Enum.Material.Grass
  99. o2.BrickColor = BrickColor.new("Laurel green")
  100. o2.Position = Vector3.new(8.25000191, 3.9935112e-006, -39.25)
  101. o2.Rotation = Vector3.new(-0, 0, -90)
  102. o2.Anchored = true
  103. o2.Shape = Enum.PartType.Cylinder
  104. o2.Size = Vector3.new(0.5, 20, 19.5)
  105. o2.CFrame = CFrame.new(8.25000191, 3.9935112e-006, -39.25, 0, 1.00000024, 0, -1.00000024, 0, 0, 0, 0, 1)
  106. o2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  107. o2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  108. o2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  109. o2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  110. o2.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  111. o2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  112. o2.Color = Color3.new(0.658824, 0.741176, 0.6)
  113. o2.Position = Vector3.new(8.25000191, 3.9935112e-006, -39.25)
  114. o3.Name = "Pokemon"
  115. o3.Parent = o1
  116. o3.Transparency = 1
  117. o3.Position = Vector3.new(8.5, 1.84000468, -39.25)
  118. o3.Anchored = true
  119. o3.CanCollide = false
  120. o3.Size = Vector3.new(8, 8, 0.5)
  121. o3.CFrame = CFrame.new(8.5, 1.84000468, -39.25, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  122. o3.Position = Vector3.new(8.5, 1.84000468, -39.25)
  123. o4.Name = "a"
  124. o4.Parent = o3
  125. o4.Texture = "rbxassetid://57487220"
  126. o5.Name = "b"
  127. o5.Parent = o3
  128. o5.Texture = "rbxassetid://57487220"
  129. o5.Face = Enum.NormalId.Back
  130. o6.Parent = o1
  131. o6.Material = Enum.Material.Grass
  132. o6.BrickColor = BrickColor.new("Laurel green")
  133. o6.Position = Vector3.new(-17.7499981, 3.9935112e-006, 1.75)
  134. o6.Rotation = Vector3.new(-0, 0, -90)
  135. o6.Anchored = true
  136. o6.Shape = Enum.PartType.Cylinder
  137. o6.Size = Vector3.new(0.5, 20, 19.5)
  138. o6.CFrame = CFrame.new(-17.7499981, 3.9935112e-006, 1.75, 0, 1.00000024, 0, -1.00000024, 0, 0, 0, 0, 1)
  139. o6.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  140. o6.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  141. o6.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  142. o6.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  143. o6.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  144. o6.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  145. o6.Color = Color3.new(0.658824, 0.741176, 0.6)
  146. o6.Position = Vector3.new(-17.7499981, 3.9935112e-006, 1.75)
  147. o7.Parent = o6
  148. o7.SoundId = "rbxassetid://155973042"
  149. o7.Volume = 1
  150. o7.Looped = true
  151. o8.Parent = o7
  152. table.insert(cors,coroutine.create(function()
  153. wait()
  154. runDummyScript(function()
  155. script.Parent : play()
  156. end,o8)
  157. end))
  158. o9.Parent = o1
  159. o9.Transparency = 1
  160. o9.Position = Vector3.new(3.5, -8.24998856, 3)
  161. o9.Rotation = Vector3.new(-180, 0, -180)
  162. o9.Anchored = true
  163. o9.CanCollide = false
  164. o9.Size = Vector3.new(27, 21, 2)
  165. o9.CFrame = CFrame.new(3.5, -8.24998856, 3, -1.00000262, 0, 0, 0, 1, 0, 0, 0, -1.00000262)
  166. o9.Position = Vector3.new(3.5, -8.24998856, 3)
  167. o10.Parent = o9
  168. o11.Parent = o10
  169. o11.Size = UDim2.new(0,200,0,50)
  170. o11.Text = "Fight"
  171. o11.BackgroundColor3 = Color3.new(0.203922, 0.203922, 0.203922)
  172. o11.BorderSizePixel = 3
  173. o11.Font = Enum.Font.SourceSans
  174. o11.FontSize = Enum.FontSize.Size36
  175. o11.TextColor3 = Color3.new(1, 1, 1)
  176. o12.Parent = o11
  177. o13.Parent = o11
  178. table.insert(cors,coroutine.create(function()
  179. wait()
  180. runDummyScript(function()
  181. Pokemon = {37583280,699093421,57487220}
  182.  
  183. script.Parent.MouseButton1Down : connect(function()
  184.     script.Parent.Sound : play()
  185.     game.Workspace.Model.Pokemon.a.Texture = "rbxassetid://" .. Pokemon[math.random(1,3)]
  186.     game.Workspace.Model.Pokemon.b.Texture = game.Workspace.Model.Pokemon.a.Texture
  187. end)
  188. end,o13)
  189. end))
  190. o14.Parent = o11
  191. o14.SoundId = "rbxassetid://296102734"
  192. o14.Volume = 1
  193. o15.Name = "b"
  194. o15.Parent = o1
  195. o15.Transparency = 1
  196. o15.Position = Vector3.new(-18.5, 4.84000492, 2.75)
  197. o15.Anchored = true
  198. o15.CanCollide = false
  199. o15.Size = Vector3.new(8, 8, 0.5)
  200. o15.CFrame = CFrame.new(-18.5, 4.84000492, 2.75, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  201. o15.Position = Vector3.new(-18.5, 4.84000492, 2.75)
  202. o16.Name = "a"
  203. o16.Parent = o15
  204. o16.Texture = "rbxassetid://121101746"
  205. o17.Name = "b"
  206. o17.Parent = o15
  207. o17.Texture = "rbxassetid://121101746"
  208. o17.Face = Enum.NormalId.Back
  209. mas.Parent = workspace
  210. mas:MakeJoints()
  211. local mas1 = mas:GetChildren()
  212. for i=1,#mas1 do
  213.     mas1[i].Parent = workspace
  214.     ypcall(function() mas1[i]:MakeJoints() end)
  215. end
  216. mas:Destroy()
  217. for i=1,#cors do
  218. coroutine.resume(cors[i])
  219. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement