Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- local chil = workspace:GetChildren()
- for i,v in pairs(chil) do
- if not (v==script or v:IsA("Camera") or v:IsA("Terrain") or game:GetService("Players"):GetPlayerFromCharacter(v)~=nil) then
- v:Destroy()
- end
- end
- Part0 = Instance.new("Part")
- Tool1 = Instance.new("Tool")
- Part2 = Instance.new("Part")
- Decal3 = Instance.new("Decal")
- Decal4 = Instance.new("Decal")
- Decal5 = Instance.new("Decal")
- Decal6 = Instance.new("Decal")
- Decal7 = Instance.new("Decal")
- Decal8 = Instance.new("Decal")
- BoolValue9 = Instance.new("BoolValue")
- ObjectValue10 = Instance.new("ObjectValue")
- Sound11 = Instance.new("Sound")
- Sound12 = Instance.new("Sound")
- ObjectValue13 = Instance.new("ObjectValue")
- ObjectValue14 = Instance.new("ObjectValue")
- Script15 = Instance.new("Script")
- LocalScript16 = Instance.new("LocalScript")
- Script17 = Instance.new("Script")
- LocalScript18 = Instance.new("LocalScript")
- ObjectValue19 = Instance.new("ObjectValue")
- ScreenGui20 = Instance.new("ScreenGui")
- TextLabel21 = Instance.new("TextLabel")
- BillboardGui22 = Instance.new("BillboardGui")
- ImageLabel23 = Instance.new("ImageLabel")
- Script24 = Instance.new("Script")
- BillboardGui25 = Instance.new("BillboardGui")
- ImageLabel26 = Instance.new("ImageLabel")
- Script27 = Instance.new("Script")
- Model28 = Instance.new("Model")
- LocalScript29 = Instance.new("LocalScript")
- Model30 = Instance.new("Model")
- LocalScript31 = Instance.new("LocalScript")
- Part0.Name = "Baseplate"
- Part0.Parent = mas
- Part0.BrickColor = BrickColor.new("Dark stone grey")
- Part0.Anchored = true
- Part0.Locked = true
- Part0.FormFactor = Enum.FormFactor.Symmetric
- Part0.Size = Vector3.new(512, 20, 512)
- Part0.CFrame = CFrame.new(0, -10, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part0.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part0.Position = Vector3.new(0, -10, 0)
- Part0.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Tool1.Name = "Pokeball"
- Tool1.Parent = mas
- Tool1.GripPos = Vector3.new(0, 0, 0.400000006)
- Part2.Name = "Handle"
- Part2.Parent = Tool1
- Part2.BrickColor = BrickColor.new("White")
- Part2.Transparency = 1
- Part2.Rotation = Vector3.new(90, 90, 0)
- Part2.FormFactor = Enum.FormFactor.Symmetric
- Part2.Shape = Enum.PartType.Ball
- Part2.Size = Vector3.new(1, 1, 1)
- Part2.CFrame = CFrame.new(-2.5, 0.5, -11.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part2.Color = Color3.new(0.94902, 0.952941, 0.952941)
- Part2.Position = Vector3.new(-2.5, 0.5, -11.5)
- Part2.Orientation = Vector3.new(0, 90, 90)
- Part2.Color = Color3.new(0.94902, 0.952941, 0.952941)
- Decal3.Parent = Part2
- Decal3.Texture = "http://www.roblox.com/asset/?id=25770051"
- Decal3.Face = Enum.NormalId.Bottom
- Decal4.Parent = Part2
- Decal4.Texture = "http://www.roblox.com/asset/?id=25770081"
- Decal5.Parent = Part2
- Decal5.Texture = "http://www.roblox.com/asset/?id=25770106"
- Decal5.Face = Enum.NormalId.Left
- Decal6.Parent = Part2
- Decal6.Texture = "http://www.roblox.com/asset/?id=25770106"
- Decal6.Face = Enum.NormalId.Back
- Decal7.Parent = Part2
- Decal7.Texture = "http://www.roblox.com/asset/?id=25770106"
- Decal7.Face = Enum.NormalId.Right
- Decal8.Parent = Part2
- Decal8.Texture = "http://www.roblox.com/asset/?id=25770136"
- Decal8.Face = Enum.NormalId.Top
- BoolValue9.Name = "Capture"
- BoolValue9.Parent = Part2
- ObjectValue10.Name = "Player"
- ObjectValue10.Parent = Part2
- Sound11.Name = "CaptureSound"
- Sound11.Parent = Part2
- Sound11.Pitch = 7
- Sound11.SoundId = "http://www.roblox.com/asset/?id=1994345"
- Sound11.Volume = 0
- Sound12.Name = "Release"
- Sound12.Parent = Part2
- Sound12.Pitch = 2
- Sound12.SoundId = "http://www.roblox.com/asset/?id=3931318"
- Sound12.Volume = 0
- Sound12.PlayOnRemove = true
- ObjectValue13.Name = "Gui"
- ObjectValue13.Parent = Part2
- ObjectValue14.Name = "Players"
- ObjectValue14.Parent = Part2
- Script15.Name = "PokeScript"
- Script15.Parent = Tool1
- table.insert(cors,sandbox(Script15,function()
- local Tool = script.Parent;
- local Decals = Tool.Handle:GetChildren()
- function fire(v)
- Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.7
- Tool.Parent.Torso["Right Shoulder"].DesiredAngle = 3.6
- wait(.1)
- Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 1
- local Ball = Tool.Handle:clone()
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)
- local SpawnPos = vCharacter.PrimaryPart.Position
- SpawnPos = SpawnPos + (v*8)
- for _, v in pairs(Decals) do
- v.Parent = Tool
- end
- Ball.Name = "Ball"
- Ball.Parent = Tool
- Ball.Position = SpawnPos
- Ball.Velocity = v * 100
- local new = Tool.PokeBall:clone()
- new.Disabled = false
- new.Parent = Ball
- wait(4)
- --Ball:remove()
- for _, v in pairs(Decals) do
- v.Parent = Tool.Handle
- end
- end
- function onActivated()
- if not Tool.Enabled then
- return
- end
- Tool.Enabled = false
- local targetPos = Tool.Parent.Humanoid.TargetPoint
- local lookAt = (targetPos - Tool.Parent.Head.Position).unit
- fire(lookAt)
- Tool.Enabled = true
- end
- Tool.Activated:connect(onActivated)
- local debounce = false
- function getPlayer(humanoid)
- local players = game.Players:children()
- for i = 1, #players do
- if players[i].Character.Humanoid == humanoid then return players[i] end
- end
- return nil
- end
- function onTouch(part)
- local human = part.Parent:findFirstChild("Humanoid")
- if (human ~= nil) and debounce == false then
- debounce = true
- local player = getPlayer(human)
- if (player == nil) then return end
- script.Parent:clone().Parent = player.Backpack
- wait(2)
- debounce = false
- end
- end
- script.Parent.Parent.Touched:connect(onTouch)
- end))
- LocalScript16.Name = "Local Gui"
- LocalScript16.Parent = Tool1
- table.insert(cors,sandbox(LocalScript16,function()
- local Tool = script.Parent;
- enabled = true
- function onMouseButton1Down(mouse)
- if not enabled then
- return
- end
- mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
- wait(4)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- end
- function onEquippedLocal(mouse)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- mouse.Button1Down:connect(function() onMouseButton1Down(mouse) end)
- end
- Tool.Equipped:connect(onEquippedLocal)
- end))
- Script17.Name = "PokeBall"
- Script17.Parent = Tool1
- Script17.Disabled = true
- table.insert(cors,sandbox(Script17,function()
- local Ball = script.Parent;
- local Tool = Ball.Parent;
- local Capture = Tool.Capture
- local Player = Tool.Player
- local Players = Tool.Players
- local Gui = Tool.Gui
- local cpt = Tool.Cpt:Clone()
- local rls = Tool.Rls:Clone()
- function Cam(Player, Subject)
- local new_script = script.Camera:clone()
- new_script.Disabled = false
- new_script.Sub.Value = Subject
- new_script = new_script:clone()
- new_script.Parent = Player
- wait(0.04)
- end
- function removeGui(gui)
- for i = 0.2, 1, .1 do
- gui.BackgroundTransparency = i
- wait(0.075)
- end
- gui.Parent:remove()
- end
- function onTouch(hit)
- connection:disconnect()
- if Capture.Value == true then --when released
- Ball.Anchored = true
- local c = Instance.new("Smoke")
- c.Parent = Ball
- c.RiseVelocity = 4
- rls.Parent = Ball
- wait(2)
- if Players.Value and Gui.Value then
- removeGui(Gui.Value.TextLabel)
- Cam(Players.Value.Backpack, Player.Value.Humanoid)
- end
- --wait(.04)
- Player.Value.Parent = Workspace
- Player.Value:makeJoints()
- if Player.Value:IsA("Model") then
- Player.Value:MoveTo(Ball.Position)
- elseif Player.Value:IsA("BasePart") then
- Player.Value.CFrame = Ball.CFrame + Vector3.new(0, 5, 0)
- else
- Player.Value.Parent = Workspace
- print("Cannot move type "..Player.Value.className)
- end
- Ball.Release.Volume = 1
- Ball.Release:Play()
- --wait(0.3)
- --c:remove()
- Capture.Value = false
- Player.Value = nil
- Tool.Name = "Pokeball"
- Ball:remove()
- else
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid and humanoid.Parent ~= Tool.Parent then --when caught
- local spark = Instance.new("Sparkles")
- Ball.Anchored = true
- cpt.Parent = Ball
- spark.Parent = Ball
- spark.Color = Color3.new(1, 0, 0)
- Capture.Value = true
- Player.Value = humanoid.Parent
- Ball.CaptureSound.Volume = 1
- Ball.CaptureSound:Play()
- Tool.Name = Player.Value.Name
- Players.Value = game.Players:GetPlayerFromCharacter(humanoid.Parent)
- if Players.Value then
- Gui.Value = Tool.CaptureGui:clone()
- Gui.Value.Parent = Players.Value.PlayerGui
- Cam(Players.Value.Backpack, Tool.Handle)
- end
- --wait(.04)
- humanoid.Parent.Parent = game.Lighting
- wait(2)
- Ball:remove()
- else
- wait(2)
- Ball:remove()
- end
- end
- end
- connection = Ball.Touched:connect(onTouch)
- local debounce = false
- function getPlayer(humanoid)
- local players = game.Players:children()
- for i = 1, #players do
- if players[i].Character.Humanoid == humanoid then return players[i] end
- end
- return nil
- end
- function onTouch(part)
- local human = part.Parent:findFirstChild("Humanoid")
- if (human ~= nil) and debounce == false then
- debounce = true
- local player = getPlayer(human)
- if (player == nil) then return end
- script.Parent:clone().Parent = player.Backpack
- wait(2)
- debounce = false
- end
- end
- script.Parent.Parent.Touched:connect(onTouch)
- end))
- LocalScript18.Name = "Camera"
- LocalScript18.Parent = Script17
- LocalScript18.Disabled = true
- table.insert(cors,sandbox(LocalScript18,function()
- wait()
- game.Workspace.CurrentCamera.CameraSubject = script.Sub.Value
- game.Workspace.CurrentCamera.CameraType = "Custom"
- wait()
- script:remove()
- end))
- ObjectValue19.Name = "Sub"
- ObjectValue19.Parent = LocalScript18
- ScreenGui20.Name = "CaptureGui"
- ScreenGui20.Parent = Tool1
- TextLabel21.Parent = ScreenGui20
- TextLabel21.Transparency = 0.20000000298023
- TextLabel21.Size = UDim2.new(1, 300, 1, 300)
- TextLabel21.Text = "You have been captured. Please wait to be released."
- TextLabel21.Position = UDim2.new(0, 0, 0, -23)
- TextLabel21.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel21.BackgroundTransparency = 0.20000000298023
- TextLabel21.TextColor3 = Color3.new(1, 1, 1)
- BillboardGui22.Name = "Rls"
- BillboardGui22.Parent = Tool1
- BillboardGui22.Size = UDim2.new(0, 1, 0, 1)
- BillboardGui22.StudsOffset = Vector3.new(0, 6, 0)
- ImageLabel23.Parent = BillboardGui22
- ImageLabel23.Transparency = 1
- ImageLabel23.Size = UDim2.new(0, 170, 0, 170)
- ImageLabel23.BackgroundColor3 = Color3.new(0.721569, 0.717647, 0.729412)
- ImageLabel23.BackgroundTransparency = 1
- ImageLabel23.Image = "http://www.roblox.com/asset/?id=25885883"
- Script24.Parent = BillboardGui22
- table.insert(cors,sandbox(Script24,function()
- script.Parent.Adornee=script.Parent.Parent
- end))
- BillboardGui25.Name = "Cpt"
- BillboardGui25.Parent = Tool1
- BillboardGui25.Size = UDim2.new(0, 1, 0, 1)
- BillboardGui25.StudsOffset = Vector3.new(0, 6, 0)
- ImageLabel26.Parent = BillboardGui25
- ImageLabel26.Transparency = 1
- ImageLabel26.Size = UDim2.new(0, 170, 0, 170)
- ImageLabel26.BackgroundColor3 = Color3.new(0.72549, 0.721569, 0.733333)
- ImageLabel26.BackgroundTransparency = 1
- ImageLabel26.Image = "http://www.roblox.com/asset/?id=25885907"
- Script27.Parent = BillboardGui25
- table.insert(cors,sandbox(Script27,function()
- script.Parent.Adornee=script.Parent.Parent
- end))
- Model28.Name = "CompiledScripts"
- Model28.Parent = mas
- LocalScript29.Name = "Script1"
- LocalScript29.Parent = Model28
- table.insert(cors,sandbox(LocalScript29,function()
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- local chil = workspace:GetChildren()
- for i,v in pairs(chil) do
- if not (v==script or v:IsA("Camera") or v:IsA("Terrain") or game:GetService("Players"):GetPlayerFromCharacter(v)~=nil) then
- v:Destroy()
- end
- end
- Part0 = Instance.new("Part")
- Tool1 = Instance.new("Tool")
- Part2 = Instance.new("Part")
- Decal3 = Instance.new("Decal")
- Decal4 = Instance.new("Decal")
- Decal5 = Instance.new("Decal")
- Decal6 = Instance.new("Decal")
- Decal7 = Instance.new("Decal")
- Decal8 = Instance.new("Decal")
- BoolValue9 = Instance.new("BoolValue")
- ObjectValue10 = Instance.new("ObjectValue")
- Sound11 = Instance.new("Sound")
- Sound12 = Instance.new("Sound")
- ObjectValue13 = Instance.new("ObjectValue")
- ObjectValue14 = Instance.new("ObjectValue")
- Script15 = Instance.new("Script")
- LocalScript16 = Instance.new("LocalScript")
- Script17 = Instance.new("Script")
- LocalScript18 = Instance.new("LocalScript")
- ObjectValue19 = Instance.new("ObjectValue")
- ScreenGui20 = Instance.new("ScreenGui")
- TextLabel21 = Instance.new("TextLabel")
- BillboardGui22 = Instance.new("BillboardGui")
- ImageLabel23 = Instance.new("ImageLabel")
- Script24 = Instance.new("Script")
- BillboardGui25 = Instance.new("BillboardGui")
- ImageLabel26 = Instance.new("ImageLabel")
- Script27 = Instance.new("Script")
- Part0.Name = "Baseplate"
- Part0.Parent = mas
- Part0.BrickColor = BrickColor.new("Dark stone grey")
- Part0.Anchored = true
- Part0.Locked = true
- Part0.FormFactor = Enum.FormFactor.Symmetric
- Part0.Size = Vector3.new(512, 20, 512)
- Part0.CFrame = CFrame.new(0, -10, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part0.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part0.Position = Vector3.new(0, -10, 0)
- Part0.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Tool1.Name = "Pokeball"
- Tool1.Parent = mas
- Tool1.GripPos = Vector3.new(0, 0, 0.400000006)
- Part2.Name = "Handle"
- Part2.Parent = Tool1
- Part2.BrickColor = BrickColor.new("White")
- Part2.Transparency = 1
- Part2.Rotation = Vector3.new(90, 90, 0)
- Part2.FormFactor = Enum.FormFactor.Symmetric
- Part2.Shape = Enum.PartType.Ball
- Part2.Size = Vector3.new(1, 1, 1)
- Part2.CFrame = CFrame.new(-6.13871717, 0.500005007, -11.435256, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part2.Color = Color3.new(0.94902, 0.952941, 0.952941)
- Part2.Position = Vector3.new(-6.13871717, 0.500005007, -11.435256)
- Part2.Orientation = Vector3.new(0, 90, 90)
- Part2.Color = Color3.new(0.94902, 0.952941, 0.952941)
- Decal3.Parent = Part2
- Decal3.Texture = "http://www.roblox.com/asset/?id=25770051"
- Decal3.Face = Enum.NormalId.Bottom
- Decal4.Parent = Part2
- Decal4.Texture = "http://www.roblox.com/asset/?id=25770081"
- Decal5.Parent = Part2
- Decal5.Texture = "http://www.roblox.com/asset/?id=25770106"
- Decal5.Face = Enum.NormalId.Left
- Decal6.Parent = Part2
- Decal6.Texture = "http://www.roblox.com/asset/?id=25770106"
- Decal6.Face = Enum.NormalId.Back
- Decal7.Parent = Part2
- Decal7.Texture = "http://www.roblox.com/asset/?id=25770106"
- Decal7.Face = Enum.NormalId.Right
- Decal8.Parent = Part2
- Decal8.Texture = "http://www.roblox.com/asset/?id=25770136"
- Decal8.Face = Enum.NormalId.Top
- BoolValue9.Name = "Capture"
- BoolValue9.Parent = Part2
- ObjectValue10.Name = "Player"
- ObjectValue10.Parent = Part2
- Sound11.Name = "CaptureSound"
- Sound11.Parent = Part2
- Sound11.Pitch = 7
- Sound11.SoundId = "http://www.roblox.com/asset/?id=1994345"
- Sound11.Volume = 0
- Sound12.Name = "Release"
- Sound12.Parent = Part2
- Sound12.Pitch = 2
- Sound12.SoundId = "http://www.roblox.com/asset/?id=3931318"
- Sound12.Volume = 0
- Sound12.PlayOnRemove = true
- ObjectValue13.Name = "Gui"
- ObjectValue13.Parent = Part2
- ObjectValue14.Name = "Players"
- ObjectValue14.Parent = Part2
- Script15.Name = "PokeScript"
- Script15.Parent = Tool1
- table.insert(cors,sandbox(Script15,function()
- local Tool = script.Parent;
- local Decals = Tool.Handle:GetChildren()
- function fire(v)
- Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.7
- Tool.Parent.Torso["Right Shoulder"].DesiredAngle = 3.6
- wait(.1)
- Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 1
- local Ball = Tool.Handle:clone()
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)
- local SpawnPos = vCharacter.PrimaryPart.Position
- SpawnPos = SpawnPos + (v*8)
- for _, v in pairs(Decals) do
- v.Parent = Tool
- end
- Ball.Name = "Ball"
- Ball.Parent = Tool
- Ball.Position = SpawnPos
- Ball.Velocity = v * 100
- local new = Tool.PokeBall:clone()
- new.Disabled = false
- new.Parent = Ball
- wait(4)
- --Ball:remove()
- for _, v in pairs(Decals) do
- v.Parent = Tool.Handle
- end
- end
- function onActivated()
- if not Tool.Enabled then
- return
- end
- Tool.Enabled = false
- local targetPos = Tool.Parent.Humanoid.TargetPoint
- local lookAt = (targetPos - Tool.Parent.Head.Position).unit
- fire(lookAt)
- Tool.Enabled = true
- end
- Tool.Activated:connect(onActivated)
- local debounce = false
- function getPlayer(humanoid)
- local players = game.Players:children()
- for i = 1, #players do
- if players[i].Character.Humanoid == humanoid then return players[i] end
- end
- return nil
- end
- function onTouch(part)
- local human = part.Parent:findFirstChild("Humanoid")
- if (human ~= nil) and debounce == false then
- debounce = true
- local player = getPlayer(human)
- if (player == nil) then return end
- script.Parent:clone().Parent = player.Backpack
- wait(2)
- debounce = false
- end
- end
- script.Parent.Parent.Touched:connect(onTouch)
- end))
- LocalScript16.Name = "Local Gui"
- LocalScript16.Parent = Tool1
- table.insert(cors,sandbox(LocalScript16,function()
- local Tool = script.Parent;
- enabled = true
- function onMouseButton1Down(mouse)
- if not enabled then
- return
- end
- mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
- wait(4)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- end
- function onEquippedLocal(mouse)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- mouse.Button1Down:connect(function() onMouseButton1Down(mouse) end)
- end
- Tool.Equipped:connect(onEquippedLocal)
- end))
- Script17.Name = "PokeBall"
- Script17.Parent = Tool1
- Script17.Disabled = true
- table.insert(cors,sandbox(Script17,function()
- local Ball = script.Parent;
- local Tool = Ball.Parent;
- local Capture = Tool.Capture
- local Player = Tool.Player
- local Players = Tool.Players
- local Gui = Tool.Gui
- local cpt = Tool.Cpt:Clone()
- local rls = Tool.Rls:Clone()
- function Cam(Player, Subject)
- local new_script = script.Camera:clone()
- new_script.Disabled = false
- new_script.Sub.Value = Subject
- new_script = new_script:clone()
- new_script.Parent = Player
- wait(0.04)
- end
- function removeGui(gui)
- for i = 0.2, 1, .1 do
- gui.BackgroundTransparency = i
- wait(0.075)
- end
- gui.Parent:remove()
- end
- function onTouch(hit)
- connection:disconnect()
- if Capture.Value == true then --when released
- Ball.Anchored = true
- local c = Instance.new("Smoke")
- c.Parent = Ball
- c.RiseVelocity = 4
- rls.Parent = Ball
- wait(2)
- if Players.Value and Gui.Value then
- removeGui(Gui.Value.TextLabel)
- Cam(Players.Value.Backpack, Player.Value.Humanoid)
- end
- --wait(.04)
- Player.Value.Parent = Workspace
- Player.Value:makeJoints()
- if Player.Value:IsA("Model") then
- Player.Value:MoveTo(Ball.Position)
- elseif Player.Value:IsA("BasePart") then
- Player.Value.CFrame = Ball.CFrame + Vector3.new(0, 5, 0)
- else
- Player.Value.Parent = Workspace
- print("Cannot move type "..Player.Value.className)
- end
- Ball.Release.Volume = 1
- Ball.Release:Play()
- --wait(0.3)
- --c:remove()
- Capture.Value = false
- Player.Value = nil
- Tool.Name = "Pokeball"
- Ball:remove()
- else
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid and humanoid.Parent ~= Tool.Parent then --when caught
- local spark = Instance.new("Sparkles")
- Ball.Anchored = true
- cpt.Parent = Ball
- spark.Parent = Ball
- spark.Color = Color3.new(1, 0, 0)
- Capture.Value = true
- Player.Value = humanoid.Parent
- Ball.CaptureSound.Volume = 1
- Ball.CaptureSound:Play()
- Tool.Name = Player.Value.Name
- Players.Value = game.Players:GetPlayerFromCharacter(humanoid.Parent)
- if Players.Value then
- Gui.Value = Tool.CaptureGui:clone()
- Gui.Value.Parent = Players.Value.PlayerGui
- Cam(Players.Value.Backpack, Tool.Handle)
- end
- --wait(.04)
- humanoid.Parent.Parent = game.Lighting
- wait(2)
- Ball:remove()
- else
- wait(2)
- Ball:remove()
- end
- end
- end
- connection = Ball.Touched:connect(onTouch)
- local debounce = false
- function getPlayer(humanoid)
- local players = game.Players:children()
- for i = 1, #players do
- if players[i].Character.Humanoid == humanoid then return players[i] end
- end
- return nil
- end
- function onTouch(part)
- local human = part.Parent:findFirstChild("Humanoid")
- if (human ~= nil) and debounce == false then
- debounce = true
- local player = getPlayer(human)
- if (player == nil) then return end
- script.Parent:clone().Parent = player.Backpack
- wait(2)
- debounce = false
- end
- end
- script.Parent.Parent.Touched:connect(onTouch)
- end))
- LocalScript18.Name = "Camera"
- LocalScript18.Parent = Script17
- LocalScript18.Disabled = true
- table.insert(cors,sandbox(LocalScript18,function()
- wait()
- game.Workspace.CurrentCamera.CameraSubject = script.Sub.Value
- game.Workspace.CurrentCamera.CameraType = "Custom"
- wait()
- script:remove()
- end))
- ObjectValue19.Name = "Sub"
- ObjectValue19.Parent = LocalScript18
- ScreenGui20.Name = "CaptureGui"
- ScreenGui20.Parent = Tool1
- TextLabel21.Parent = ScreenGui20
- TextLabel21.Transparency = 0.20000000298023
- TextLabel21.Size = UDim2.new(1, 300, 1, 300)
- TextLabel21.Text = "You have been captured. Please wait to be released."
- TextLabel21.Position = UDim2.new(0, 0, 0, -23)
- TextLabel21.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel21.BackgroundTransparency = 0.20000000298023
- TextLabel21.TextColor3 = Color3.new(1, 1, 1)
- BillboardGui22.Name = "Rls"
- BillboardGui22.Parent = Tool1
- BillboardGui22.Size = UDim2.new(0, 1, 0, 1)
- BillboardGui22.StudsOffset = Vector3.new(0, 6, 0)
- ImageLabel23.Parent = BillboardGui22
- ImageLabel23.Transparency = 1
- ImageLabel23.Size = UDim2.new(0, 170, 0, 170)
- ImageLabel23.BackgroundColor3 = Color3.new(0.721569, 0.717647, 0.729412)
- ImageLabel23.BackgroundTransparency = 1
- ImageLabel23.Image = "http://www.roblox.com/asset/?id=25885883"
- Script24.Parent = BillboardGui22
- table.insert(cors,sandbox(Script24,function()
- script.Parent.Adornee=script.Parent.Parent
- end))
- BillboardGui25.Name = "Cpt"
- BillboardGui25.Parent = Tool1
- BillboardGui25.Size = UDim2.new(0, 1, 0, 1)
- BillboardGui25.StudsOffset = Vector3.new(0, 6, 0)
- ImageLabel26.Parent = BillboardGui25
- ImageLabel26.Transparency = 1
- ImageLabel26.Size = UDim2.new(0, 170, 0, 170)
- ImageLabel26.BackgroundColor3 = Color3.new(0.72549, 0.721569, 0.733333)
- ImageLabel26.BackgroundTransparency = 1
- ImageLabel26.Image = "http://www.roblox.com/asset/?id=25885907"
- Script27.Parent = BillboardGui25
- table.insert(cors,sandbox(Script27,function()
- script.Parent.Adornee=script.Parent.Parent
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.PlayerGui
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- end))
- Model30.Name = "CompiledScripts"
- Model30.Parent = mas
- LocalScript31.Name = "Script1"
- LocalScript31.Parent = Model30
- table.insert(cors,sandbox(LocalScript31,function()
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- local chil = workspace:GetChildren()
- for i,v in pairs(chil) do
- if not (v==script or v:IsA("Camera") or v:IsA("Terrain") or game:GetService("Players"):GetPlayerFromCharacter(v)~=nil) then
- v:Destroy()
- end
- end
- Part0 = Instance.new("Part")
- Tool1 = Instance.new("Tool")
- Part2 = Instance.new("Part")
- Decal3 = Instance.new("Decal")
- Decal4 = Instance.new("Decal")
- Decal5 = Instance.new("Decal")
- Decal6 = Instance.new("Decal")
- Decal7 = Instance.new("Decal")
- Decal8 = Instance.new("Decal")
- BoolValue9 = Instance.new("BoolValue")
- ObjectValue10 = Instance.new("ObjectValue")
- Sound11 = Instance.new("Sound")
- Sound12 = Instance.new("Sound")
- ObjectValue13 = Instance.new("ObjectValue")
- ObjectValue14 = Instance.new("ObjectValue")
- Script15 = Instance.new("Script")
- LocalScript16 = Instance.new("LocalScript")
- Script17 = Instance.new("Script")
- LocalScript18 = Instance.new("LocalScript")
- ObjectValue19 = Instance.new("ObjectValue")
- ScreenGui20 = Instance.new("ScreenGui")
- TextLabel21 = Instance.new("TextLabel")
- BillboardGui22 = Instance.new("BillboardGui")
- ImageLabel23 = Instance.new("ImageLabel")
- Script24 = Instance.new("Script")
- BillboardGui25 = Instance.new("BillboardGui")
- ImageLabel26 = Instance.new("ImageLabel")
- Script27 = Instance.new("Script")
- Model28 = Instance.new("Model")
- LocalScript29 = Instance.new("LocalScript")
- Part0.Name = "Baseplate"
- Part0.Parent = mas
- Part0.BrickColor = BrickColor.new("Dark stone grey")
- Part0.Anchored = true
- Part0.Locked = true
- Part0.FormFactor = Enum.FormFactor.Symmetric
- Part0.Size = Vector3.new(512, 20, 512)
- Part0.CFrame = CFrame.new(0, -10, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part0.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part0.Position = Vector3.new(0, -10, 0)
- Part0.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Tool1.Name = "Pokeball"
- Tool1.Parent = mas
- Tool1.GripPos = Vector3.new(0, 0, 0.400000006)
- Part2.Name = "Handle"
- Part2.Parent = Tool1
- Part2.BrickColor = BrickColor.new("White")
- Part2.Transparency = 1
- Part2.Rotation = Vector3.new(90, 90, 0)
- Part2.FormFactor = Enum.FormFactor.Symmetric
- Part2.Shape = Enum.PartType.Ball
- Part2.Size = Vector3.new(1, 1, 1)
- Part2.CFrame = CFrame.new(-2.5, 0.5, -11.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part2.Color = Color3.new(0.94902, 0.952941, 0.952941)
- Part2.Position = Vector3.new(-2.5, 0.5, -11.5)
- Part2.Orientation = Vector3.new(0, 90, 90)
- Part2.Color = Color3.new(0.94902, 0.952941, 0.952941)
- Decal3.Parent = Part2
- Decal3.Texture = "http://www.roblox.com/asset/?id=25770051"
- Decal3.Face = Enum.NormalId.Bottom
- Decal4.Parent = Part2
- Decal4.Texture = "http://www.roblox.com/asset/?id=25770081"
- Decal5.Parent = Part2
- Decal5.Texture = "http://www.roblox.com/asset/?id=25770106"
- Decal5.Face = Enum.NormalId.Left
- Decal6.Parent = Part2
- Decal6.Texture = "http://www.roblox.com/asset/?id=25770106"
- Decal6.Face = Enum.NormalId.Back
- Decal7.Parent = Part2
- Decal7.Texture = "http://www.roblox.com/asset/?id=25770106"
- Decal7.Face = Enum.NormalId.Right
- Decal8.Parent = Part2
- Decal8.Texture = "http://www.roblox.com/asset/?id=25770136"
- Decal8.Face = Enum.NormalId.Top
- BoolValue9.Name = "Capture"
- BoolValue9.Parent = Part2
- ObjectValue10.Name = "Player"
- ObjectValue10.Parent = Part2
- Sound11.Name = "CaptureSound"
- Sound11.Parent = Part2
- Sound11.Pitch = 7
- Sound11.SoundId = "http://www.roblox.com/asset/?id=1994345"
- Sound11.Volume = 0
- Sound12.Name = "Release"
- Sound12.Parent = Part2
- Sound12.Pitch = 2
- Sound12.SoundId = "http://www.roblox.com/asset/?id=3931318"
- Sound12.Volume = 0
- Sound12.PlayOnRemove = true
- ObjectValue13.Name = "Gui"
- ObjectValue13.Parent = Part2
- ObjectValue14.Name = "Players"
- ObjectValue14.Parent = Part2
- Script15.Name = "PokeScript"
- Script15.Parent = Tool1
- table.insert(cors,sandbox(Script15,function()
- local Tool = script.Parent;
- local Decals = Tool.Handle:GetChildren()
- function fire(v)
- Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.7
- Tool.Parent.Torso["Right Shoulder"].DesiredAngle = 3.6
- wait(.1)
- Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 1
- local Ball = Tool.Handle:clone()
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)
- local SpawnPos = vCharacter.PrimaryPart.Position
- SpawnPos = SpawnPos + (v*8)
- for _, v in pairs(Decals) do
- v.Parent = Tool
- end
- Ball.Name = "Ball"
- Ball.Parent = Tool
- Ball.Position = SpawnPos
- Ball.Velocity = v * 100
- local new = Tool.PokeBall:clone()
- new.Disabled = false
- new.Parent = Ball
- wait(4)
- --Ball:remove()
- for _, v in pairs(Decals) do
- v.Parent = Tool.Handle
- end
- end
- function onActivated()
- if not Tool.Enabled then
- return
- end
- Tool.Enabled = false
- local targetPos = Tool.Parent.Humanoid.TargetPoint
- local lookAt = (targetPos - Tool.Parent.Head.Position).unit
- fire(lookAt)
- Tool.Enabled = true
- end
- Tool.Activated:connect(onActivated)
- local debounce = false
- function getPlayer(humanoid)
- local players = game.Players:children()
- for i = 1, #players do
- if players[i].Character.Humanoid == humanoid then return players[i] end
- end
- return nil
- end
- function onTouch(part)
- local human = part.Parent:findFirstChild("Humanoid")
- if (human ~= nil) and debounce == false then
- debounce = true
- local player = getPlayer(human)
- if (player == nil) then return end
- script.Parent:clone().Parent = player.Backpack
- wait(2)
- debounce = false
- end
- end
- script.Parent.Parent.Touched:connect(onTouch)
- end))
- LocalScript16.Name = "Local Gui"
- LocalScript16.Parent = Tool1
- table.insert(cors,sandbox(LocalScript16,function()
- local Tool = script.Parent;
- enabled = true
- function onMouseButton1Down(mouse)
- if not enabled then
- return
- end
- mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
- wait(4)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- end
- function onEquippedLocal(mouse)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- mouse.Button1Down:connect(function() onMouseButton1Down(mouse) end)
- end
- Tool.Equipped:connect(onEquippedLocal)
- end))
- Script17.Name = "PokeBall"
- Script17.Parent = Tool1
- Script17.Disabled = true
- table.insert(cors,sandbox(Script17,function()
- local Ball = script.Parent;
- local Tool = Ball.Parent;
- local Capture = Tool.Capture
- local Player = Tool.Player
- local Players = Tool.Players
- local Gui = Tool.Gui
- local cpt = Tool.Cpt:Clone()
- local rls = Tool.Rls:Clone()
- function Cam(Player, Subject)
- local new_script = script.Camera:clone()
- new_script.Disabled = false
- new_script.Sub.Value = Subject
- new_script = new_script:clone()
- new_script.Parent = Player
- wait(0.04)
- end
- function removeGui(gui)
- for i = 0.2, 1, .1 do
- gui.BackgroundTransparency = i
- wait(0.075)
- end
- gui.Parent:remove()
- end
- function onTouch(hit)
- connection:disconnect()
- if Capture.Value == true then --when released
- Ball.Anchored = true
- local c = Instance.new("Smoke")
- c.Parent = Ball
- c.RiseVelocity = 4
- rls.Parent = Ball
- wait(2)
- if Players.Value and Gui.Value then
- removeGui(Gui.Value.TextLabel)
- Cam(Players.Value.Backpack, Player.Value.Humanoid)
- end
- --wait(.04)
- Player.Value.Parent = Workspace
- Player.Value:makeJoints()
- if Player.Value:IsA("Model") then
- Player.Value:MoveTo(Ball.Position)
- elseif Player.Value:IsA("BasePart") then
- Player.Value.CFrame = Ball.CFrame + Vector3.new(0, 5, 0)
- else
- Player.Value.Parent = Workspace
- print("Cannot move type "..Player.Value.className)
- end
- Ball.Release.Volume = 1
- Ball.Release:Play()
- --wait(0.3)
- --c:remove()
- Capture.Value = false
- Player.Value = nil
- Tool.Name = "Pokeball"
- Ball:remove()
- else
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid and humanoid.Parent ~= Tool.Parent then --when caught
- local spark = Instance.new("Sparkles")
- Ball.Anchored = true
- cpt.Parent = Ball
- spark.Parent = Ball
- spark.Color = Color3.new(1, 0, 0)
- Capture.Value = true
- Player.Value = humanoid.Parent
- Ball.CaptureSound.Volume = 1
- Ball.CaptureSound:Play()
- Tool.Name = Player.Value.Name
- Players.Value = game.Players:GetPlayerFromCharacter(humanoid.Parent)
- if Players.Value then
- Gui.Value = Tool.CaptureGui:clone()
- Gui.Value.Parent = Players.Value.PlayerGui
- Cam(Players.Value.Backpack, Tool.Handle)
- end
- --wait(.04)
- humanoid.Parent.Parent = game.Lighting
- wait(2)
- Ball:remove()
- else
- wait(2)
- Ball:remove()
- end
- end
- end
- connection = Ball.Touched:connect(onTouch)
- local debounce = false
- function getPlayer(humanoid)
- local players = game.Players:children()
- for i = 1, #players do
- if players[i].Character.Humanoid == humanoid then return players[i] end
- end
- return nil
- end
- function onTouch(part)
- local human = part.Parent:findFirstChild("Humanoid")
- if (human ~= nil) and debounce == false then
- debounce = true
- local player = getPlayer(human)
- if (player == nil) then return end
- script.Parent:clone().Parent = player.Backpack
- wait(2)
- debounce = false
- end
- end
- script.Parent.Parent.Touched:connect(onTouch)
- end))
- LocalScript18.Name = "Camera"
- LocalScript18.Parent = Script17
- LocalScript18.Disabled = true
- table.insert(cors,sandbox(LocalScript18,function()
- wait()
- game.Workspace.CurrentCamera.CameraSubject = script.Sub.Value
- game.Workspace.CurrentCamera.CameraType = "Custom"
- wait()
- script:remove()
- end))
- ObjectValue19.Name = "Sub"
- ObjectValue19.Parent = LocalScript18
- ScreenGui20.Name = "CaptureGui"
- ScreenGui20.Parent = Tool1
- TextLabel21.Parent = ScreenGui20
- TextLabel21.Transparency = 0.20000000298023
- TextLabel21.Size = UDim2.new(1, 300, 1, 300)
- TextLabel21.Text = "You have been captured. Please wait to be released."
- TextLabel21.Position = UDim2.new(0, 0, 0, -23)
- TextLabel21.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel21.BackgroundTransparency = 0.20000000298023
- TextLabel21.TextColor3 = Color3.new(1, 1, 1)
- BillboardGui22.Name = "Rls"
- BillboardGui22.Parent = Tool1
- BillboardGui22.Size = UDim2.new(0, 1, 0, 1)
- BillboardGui22.StudsOffset = Vector3.new(0, 6, 0)
- ImageLabel23.Parent = BillboardGui22
- ImageLabel23.Transparency = 1
- ImageLabel23.Size = UDim2.new(0, 170, 0, 170)
- ImageLabel23.BackgroundColor3 = Color3.new(0.721569, 0.717647, 0.729412)
- ImageLabel23.BackgroundTransparency = 1
- ImageLabel23.Image = "http://www.roblox.com/asset/?id=25885883"
- Script24.Parent = BillboardGui22
- table.insert(cors,sandbox(Script24,function()
- script.Parent.Adornee=script.Parent.Parent
- end))
- BillboardGui25.Name = "Cpt"
- BillboardGui25.Parent = Tool1
- BillboardGui25.Size = UDim2.new(0, 1, 0, 1)
- BillboardGui25.StudsOffset = Vector3.new(0, 6, 0)
- ImageLabel26.Parent = BillboardGui25
- ImageLabel26.Transparency = 1
- ImageLabel26.Size = UDim2.new(0, 170, 0, 170)
- ImageLabel26.BackgroundColor3 = Color3.new(0.72549, 0.721569, 0.733333)
- ImageLabel26.BackgroundTransparency = 1
- ImageLabel26.Image = "http://www.roblox.com/asset/?id=25885907"
- Script27.Parent = BillboardGui25
- table.insert(cors,sandbox(Script27,function()
- script.Parent.Adornee=script.Parent.Parent
- end))
- Model28.Name = "CompiledScripts"
- Model28.Parent = mas
- LocalScript29.Name = "Script1"
- LocalScript29.Parent = Model28
- table.insert(cors,sandbox(LocalScript29,function()
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- local chil = workspace:GetChildren()
- for i,v in pairs(chil) do
- if not (v==script or v:IsA("Camera") or v:IsA("Terrain") or game:GetService("Players"):GetPlayerFromCharacter(v)~=nil) then
- v:Destroy()
- end
- end
- Part0 = Instance.new("Part")
- Tool1 = Instance.new("Tool")
- Part2 = Instance.new("Part")
- Decal3 = Instance.new("Decal")
- Decal4 = Instance.new("Decal")
- Decal5 = Instance.new("Decal")
- Decal6 = Instance.new("Decal")
- Decal7 = Instance.new("Decal")
- Decal8 = Instance.new("Decal")
- BoolValue9 = Instance.new("BoolValue")
- ObjectValue10 = Instance.new("ObjectValue")
- Sound11 = Instance.new("Sound")
- Sound12 = Instance.new("Sound")
- ObjectValue13 = Instance.new("ObjectValue")
- ObjectValue14 = Instance.new("ObjectValue")
- Script15 = Instance.new("Script")
- LocalScript16 = Instance.new("LocalScript")
- Script17 = Instance.new("Script")
- LocalScript18 = Instance.new("LocalScript")
- ObjectValue19 = Instance.new("ObjectValue")
- ScreenGui20 = Instance.new("ScreenGui")
- TextLabel21 = Instance.new("TextLabel")
- BillboardGui22 = Instance.new("BillboardGui")
- ImageLabel23 = Instance.new("ImageLabel")
- Script24 = Instance.new("Script")
- BillboardGui25 = Instance.new("BillboardGui")
- ImageLabel26 = Instance.new("ImageLabel")
- Script27 = Instance.new("Script")
- Part0.Name = "Baseplate"
- Part0.Parent = mas
- Part0.BrickColor = BrickColor.new("Dark stone grey")
- Part0.Anchored = true
- Part0.Locked = true
- Part0.FormFactor = Enum.FormFactor.Symmetric
- Part0.Size = Vector3.new(512, 20, 512)
- Part0.CFrame = CFrame.new(0, -10, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part0.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part0.Position = Vector3.new(0, -10, 0)
- Part0.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Tool1.Name = "Pokeball"
- Tool1.Parent = mas
- Tool1.GripPos = Vector3.new(0, 0, 0.400000006)
- Part2.Name = "Handle"
- Part2.Parent = Tool1
- Part2.BrickColor = BrickColor.new("White")
- Part2.Transparency = 1
- Part2.Rotation = Vector3.new(90, 90, 0)
- Part2.FormFactor = Enum.FormFactor.Symmetric
- Part2.Shape = Enum.PartType.Ball
- Part2.Size = Vector3.new(1, 1, 1)
- Part2.CFrame = CFrame.new(-6.13871717, 0.500005007, -11.435256, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part2.Color = Color3.new(0.94902, 0.952941, 0.952941)
- Part2.Position = Vector3.new(-6.13871717, 0.500005007, -11.435256)
- Part2.Orientation = Vector3.new(0, 90, 90)
- Part2.Color = Color3.new(0.94902, 0.952941, 0.952941)
- Decal3.Parent = Part2
- Decal3.Texture = "http://www.roblox.com/asset/?id=25770051"
- Decal3.Face = Enum.NormalId.Bottom
- Decal4.Parent = Part2
- Decal4.Texture = "http://www.roblox.com/asset/?id=25770081"
- Decal5.Parent = Part2
- Decal5.Texture = "http://www.roblox.com/asset/?id=25770106"
- Decal5.Face = Enum.NormalId.Left
- Decal6.Parent = Part2
- Decal6.Texture = "http://www.roblox.com/asset/?id=25770106"
- Decal6.Face = Enum.NormalId.Back
- Decal7.Parent = Part2
- Decal7.Texture = "http://www.roblox.com/asset/?id=25770106"
- Decal7.Face = Enum.NormalId.Right
- Decal8.Parent = Part2
- Decal8.Texture = "http://www.roblox.com/asset/?id=25770136"
- Decal8.Face = Enum.NormalId.Top
- BoolValue9.Name = "Capture"
- BoolValue9.Parent = Part2
- ObjectValue10.Name = "Player"
- ObjectValue10.Parent = Part2
- Sound11.Name = "CaptureSound"
- Sound11.Parent = Part2
- Sound11.Pitch = 7
- Sound11.SoundId = "http://www.roblox.com/asset/?id=1994345"
- Sound11.Volume = 0
- Sound12.Name = "Release"
- Sound12.Parent = Part2
- Sound12.Pitch = 2
- Sound12.SoundId = "http://www.roblox.com/asset/?id=3931318"
- Sound12.Volume = 0
- Sound12.PlayOnRemove = true
- ObjectValue13.Name = "Gui"
- ObjectValue13.Parent = Part2
- ObjectValue14.Name = "Players"
- ObjectValue14.Parent = Part2
- Script15.Name = "PokeScript"
- Script15.Parent = Tool1
- table.insert(cors,sandbox(Script15,function()
- local Tool = script.Parent;
- local Decals = Tool.Handle:GetChildren()
- function fire(v)
- Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.7
- Tool.Parent.Torso["Right Shoulder"].DesiredAngle = 3.6
- wait(.1)
- Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 1
- local Ball = Tool.Handle:clone()
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)
- local SpawnPos = vCharacter.PrimaryPart.Position
- SpawnPos = SpawnPos + (v*8)
- for _, v in pairs(Decals) do
- v.Parent = Tool
- end
- Ball.Name = "Ball"
- Ball.Parent = Tool
- Ball.Position = SpawnPos
- Ball.Velocity = v * 100
- local new = Tool.PokeBall:clone()
- new.Disabled = false
- new.Parent = Ball
- wait(4)
- --Ball:remove()
- for _, v in pairs(Decals) do
- v.Parent = Tool.Handle
- end
- end
- function onActivated()
- if not Tool.Enabled then
- return
- end
- Tool.Enabled = false
- local targetPos = Tool.Parent.Humanoid.TargetPoint
- local lookAt = (targetPos - Tool.Parent.Head.Position).unit
- fire(lookAt)
- Tool.Enabled = true
- end
- Tool.Activated:connect(onActivated)
- local debounce = false
- function getPlayer(humanoid)
- local players = game.Players:children()
- for i = 1, #players do
- if players[i].Character.Humanoid == humanoid then return players[i] end
- end
- return nil
- end
- function onTouch(part)
- local human = part.Parent:findFirstChild("Humanoid")
- if (human ~= nil) and debounce == false then
- debounce = true
- local player = getPlayer(human)
- if (player == nil) then return end
- script.Parent:clone().Parent = player.Backpack
- wait(2)
- debounce = false
- end
- end
- script.Parent.Parent.Touched:connect(onTouch)
- end))
- LocalScript16.Name = "Local Gui"
- LocalScript16.Parent = Tool1
- table.insert(cors,sandbox(LocalScript16,function()
- local Tool = script.Parent;
- enabled = true
- function onMouseButton1Down(mouse)
- if not enabled then
- return
- end
- mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
- wait(4)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- end
- function onEquippedLocal(mouse)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- mouse.Button1Down:connect(function() onMouseButton1Down(mouse) end)
- end
- Tool.Equipped:connect(onEquippedLocal)
- end))
- Script17.Name = "PokeBall"
- Script17.Parent = Tool1
- Script17.Disabled = true
- table.insert(cors,sandbox(Script17,function()
- local Ball = script.Parent;
- local Tool = Ball.Parent;
- local Capture = Tool.Capture
- local Player = Tool.Player
- local Players = Tool.Players
- local Gui = Tool.Gui
- local cpt = Tool.Cpt:Clone()
- local rls = Tool.Rls:Clone()
- function Cam(Player, Subject)
- local new_script = script.Camera:clone()
- new_script.Disabled = false
- new_script.Sub.Value = Subject
- new_script = new_script:clone()
- new_script.Parent = Player
- wait(0.04)
- end
- function removeGui(gui)
- for i = 0.2, 1, .1 do
- gui.BackgroundTransparency = i
- wait(0.075)
- end
- gui.Parent:remove()
- end
- function onTouch(hit)
- connection:disconnect()
- if Capture.Value == true then --when released
- Ball.Anchored = true
- local c = Instance.new("Smoke")
- c.Parent = Ball
- c.RiseVelocity = 4
- rls.Parent = Ball
- wait(2)
- if Players.Value and Gui.Value then
- removeGui(Gui.Value.TextLabel)
- Cam(Players.Value.Backpack, Player.Value.Humanoid)
- end
- --wait(.04)
- Player.Value.Parent = Workspace
- Player.Value:makeJoints()
- if Player.Value:IsA("Model") then
- Player.Value:MoveTo(Ball.Position)
- elseif Player.Value:IsA("BasePart") then
- Player.Value.CFrame = Ball.CFrame + Vector3.new(0, 5, 0)
- else
- Player.Value.Parent = Workspace
- print("Cannot move type "..Player.Value.className)
- end
- Ball.Release.Volume = 1
- Ball.Release:Play()
- --wait(0.3)
- --c:remove()
- Capture.Value = false
- Player.Value = nil
- Tool.Name = "Pokeball"
- Ball:remove()
- else
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid and humanoid.Parent ~= Tool.Parent then --when caught
- local spark = Instance.new("Sparkles")
- Ball.Anchored = true
- cpt.Parent = Ball
- spark.Parent = Ball
- spark.Color = Color3.new(1, 0, 0)
- Capture.Value = true
- Player.Value = humanoid.Parent
- Ball.CaptureSound.Volume = 1
- Ball.CaptureSound:Play()
- Tool.Name = Player.Value.Name
- Players.Value = game.Players:GetPlayerFromCharacter(humanoid.Parent)
- if Players.Value then
- Gui.Value = Tool.CaptureGui:clone()
- Gui.Value.Parent = Players.Value.PlayerGui
- Cam(Players.Value.Backpack, Tool.Handle)
- end
- --wait(.04)
- humanoid.Parent.Parent = game.Lighting
- wait(2)
- Ball:remove()
- else
- wait(2)
- Ball:remove()
- end
- end
- end
- connection = Ball.Touched:connect(onTouch)
- local debounce = false
- function getPlayer(humanoid)
- local players = game.Players:children()
- for i = 1, #players do
- if players[i].Character.Humanoid == humanoid then return players[i] end
- end
- return nil
- end
- function onTouch(part)
- local human = part.Parent:findFirstChild("Humanoid")
- if (human ~= nil) and debounce == false then
- debounce = true
- local player = getPlayer(human)
- if (player == nil) then return end
- script.Parent:clone().Parent = player.Backpack
- wait(2)
- debounce = false
- end
- end
- script.Parent.Parent.Touched:connect(onTouch)
- end))
- LocalScript18.Name = "Camera"
- LocalScript18.Parent = Script17
- LocalScript18.Disabled = true
- table.insert(cors,sandbox(LocalScript18,function()
- wait()
- game.Workspace.CurrentCamera.CameraSubject = script.Sub.Value
- game.Workspace.CurrentCamera.CameraType = "Custom"
- wait()
- script:remove()
- end))
- ObjectValue19.Name = "Sub"
- ObjectValue19.Parent = LocalScript18
- ScreenGui20.Name = "CaptureGui"
- ScreenGui20.Parent = Tool1
- TextLabel21.Parent = ScreenGui20
- TextLabel21.Transparency = 0.20000000298023
- TextLabel21.Size = UDim2.new(1, 300, 1, 300)
- TextLabel21.Text = "You have been captured. Please wait to be released."
- TextLabel21.Position = UDim2.new(0, 0, 0, -23)
- TextLabel21.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel21.BackgroundTransparency = 0.20000000298023
- TextLabel21.TextColor3 = Color3.new(1, 1, 1)
- BillboardGui22.Name = "Rls"
- BillboardGui22.Parent = Tool1
- BillboardGui22.Size = UDim2.new(0, 1, 0, 1)
- BillboardGui22.StudsOffset = Vector3.new(0, 6, 0)
- ImageLabel23.Parent = BillboardGui22
- ImageLabel23.Transparency = 1
- ImageLabel23.Size = UDim2.new(0, 170, 0, 170)
- ImageLabel23.BackgroundColor3 = Color3.new(0.721569, 0.717647, 0.729412)
- ImageLabel23.BackgroundTransparency = 1
- ImageLabel23.Image = "http://www.roblox.com/asset/?id=25885883"
- Script24.Parent = BillboardGui22
- table.insert(cors,sandbox(Script24,function()
- script.Parent.Adornee=script.Parent.Parent
- end))
- BillboardGui25.Name = "Cpt"
- BillboardGui25.Parent = Tool1
- BillboardGui25.Size = UDim2.new(0, 1, 0, 1)
- BillboardGui25.StudsOffset = Vector3.new(0, 6, 0)
- ImageLabel26.Parent = BillboardGui25
- ImageLabel26.Transparency = 1
- ImageLabel26.Size = UDim2.new(0, 170, 0, 170)
- ImageLabel26.BackgroundColor3 = Color3.new(0.72549, 0.721569, 0.733333)
- ImageLabel26.BackgroundTransparency = 1
- ImageLabel26.Image = "http://www.roblox.com/asset/?id=25885907"
- Script27.Parent = BillboardGui25
- table.insert(cors,sandbox(Script27,function()
- script.Parent.Adornee=script.Parent.Parent
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.PlayerGui
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = script
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement