Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print'https://pastebin.com/gHS0fTnj'
- -- if you're gonna use my content dont remove this line ^
- print'press E: (on character) Capture'
- print'E: (Anywhere with player in hand): Release'
- local function Boot_Leg_Poke_Ball(player)
- script.Parent = player:FindFirstChildWhichIsA'PlayerGui'
- local tw,players = game:GetService("TweenService"),game:GetService("Players")
- local pchar = player.Character
- local function Get_Components_Of_Mouse(player)
- local pchar = player.Character
- if pchar then
- local Remote = pchar:FindFirstChild('∞RE_Mouse')
- if not Remote then
- Remote = Instance.new("RemoteEvent",pchar)
- Remote.Name = 'RE_Mouse'
- end
- Remote.Parent = NLS(
- [[
- local lp = game:GetService'Players'.LocalPlayer
- local mouse = lp:GetMouse()
- local runs = game:GetService'RunService'
- wait(1)
- local re = script:WaitForChild('RE_Mouse')
- if re then
- mouse.KeyDown:Connect(function(k)
- re:FireServer('KeyDown',k,mouse.Hit,mouse.Target)
- end)
- re.OnClientEvent:Connect(function(arg1,arg2)
- if arg1=='ChangeMouseIcon'then
- mouse.Icon = arg2
- end
- end)
- else
- print('Fat try again.')
- end
- ]]
- ,pchar)
- return Remote
- else
- error('Best to actually put your character in the game.')
- end
- end
- local RE = Get_Components_Of_Mouse(player)
- local tool,handle,capture,head,l_arm =
- Instance.new("Tool"),Instance.new("Part"),false,pchar:WaitForChild'Head',
- pchar:WaitForChild'Left Arm'
- handle.BrickColor = BrickColor.new("Really red")
- handle.Name = 'Handle'
- handle.Shape = 'Ball'
- handle.Size = Vector3.new(1,1,1)
- handle.Material = 'Neon'
- handle.Parent = pchar
- handle.CFrame = l_arm.CFrame*CFrame.new(0,-1,0)
- handle.CanCollide = false
- handle.Massless = true
- local s = Instance.new("Sound",handle)
- s.Volume = 4
- s.SoundId = 'rbxassetid://1467076382'
- s.Looped = true
- s:Play()
- local w,captured = Instance.new("WeldConstraint",pchar)
- w.Part0 = l_arm
- w.Part1 = handle
- local function Make_PB(End_CFrame)
- local p = Instance.new("Part")
- p.Size = Vector3.new(1,1,1)
- p.BrickColor = BrickColor.new("Really red")
- p.Shape = 'Ball'
- p.Material = 'Neon'
- p.Position = l_arm.Position
- p.Parent = pchar
- p.CFrame = l_arm.CFrame*CFrame.new(0,-1,0)
- p.CanCollide = true
- p.Massless = true
- p.Anchored = true
- local ti = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,
- 0,false,0)
- local prop = {Position = l_arm.Position}
- local prop2 = {Position = End_CFrame.Position + Vector3.new(0,5,0)}
- return p,prop,prop2,ti
- end
- local function Make_Msg(Text)
- local BG = head:FindFirstChildWhichIsA'BillBoardGui'or Instance.new("BillboardGui",head)
- BG.ExtentsOffsetWorldSpace = Vector3.new(0,5,0)
- BG.Size = UDim2.new(5,0,2,0)
- BG.Enabled = true
- local TL = BG:FindFirstChildWhichIsA'TextLabel'or Instance.new("TextBox",BG)
- TL.BackgroundTransparency = 1
- TL.TextScaled = true
- TL.Size = UDim2.new(1,0,1,0)
- TL.Font = 'Code'
- TL.TextColor3 = Color3.new(255,255,255)
- TL.TextStrokeColor3 = Color3.new(0,0,0)
- TL.TextStrokeTransparency = 0
- TL.Text = ''
- spawn(function()
- for i=1,Text:len()do
- TL.Text = Text:sub(1,i)
- wait()
- end
- wait(.1)
- BG.Enabled = false
- end)
- return BG
- end
- local function Get_Player_From_Character_Descendant(ob)
- if ob then
- local full_1 = ob:GetFullName()
- local sep1 = string.find(full_1:lower(),'%.')
- if sep1 then
- local sep2 = string.find(full_1:lower(),'%.',sep1 + 1)
- if sep2 then
- local char_name = full_1:sub(sep1 + 1,sep2 - 1)
- if char_name then
- local player = game:service'Players':FindFirstChild(char_name)
- if player then
- return player
- end
- end
- end
- end
- end
- end
- local function Weldc(a,b)
- local w = a:FindFirstChildWhichIsA'WeldConstraint'or Instance.new('WeldConstraint',a)
- w.Part0 = a w.Part1 = b
- end
- if RE then
- RE.OnServerEvent:Connect(function(pl,...)
- local para = {...}
- if pl==player then
- if para[1]=='KeyDown'then
- if para[2]=='e'then
- local pl = Get_Player_From_Character_Descendant(para[4])
- if not capture and pl and not captured and para[3]then
- capture = true
- local p_c = pl.Character
- local head = p_c:FindFirstChild'Head'
- local hrp = p_c:FindFirstChild'HumanoidRootPart'
- local p,en,st,inf = Make_PB(l_arm.CFrame)
- handle.Transparency = 1
- head.Anchored = true
- tw:Create(p,inf,{CFrame = para[3]}):Play()
- wait(1)p.Anchored = false
- wait(.5)
- for _,v in pairs(p_c:GetDescendants())do
- if v:IsA'BasePart'then
- v.Massless = true
- v.Transparency = 1
- if v.Name=='Torso'then
- p.CFrame = v.CFrame
- Weldc(p,v)
- end
- elseif v:IsA'Humanoid'then
- v.PlatformStand = true
- elseif v:IsA'Motor6D'then
- if v.Name~='Neck'and v.Name~='Root'and v.Name~='Waist'
- and v.Name~='RootJoint'then
- v:Destroy()
- end
- elseif v:IsA'Decal'then
- v:Destroy()
- else
- pcall(function()
- v:Destroy()
- end)
- end
- end
- head.Anchored = false
- captured = pl.Name
- Make_Msg'Gotcha!'
- head.CFrame = p.CFrame
- Weldc(p,head)
- wait(.5)p.Anchored = true
- wait(.5)
- tw:Create(p,inf,{Position = l_arm.Position}):Play()
- wait(1)
- hrp.CFrame = handle.CFrame
- Weldc(handle,hrp)
- p:Destroy()
- handle.Transparency = 0
- capture = false
- elseif not capture and para[3]and captured~=nil then
- capture = true
- local p,en,st,inf = Make_PB(para[3])
- local tar = game:service'Players':FindFirstChild(captured)
- if tar then
- handle.Transparency = 1
- for _,v in pairs(p:GetChildren())do
- if v:IsA'WeldConstraint'then v:Destroy()end
- end
- tw:Create(p,inf,{CFrame = para[3]}):Play()
- wait(1)
- Make_Msg(tar.Name.. ', I choose you!')
- captured = nil
- tar:LoadCharacter()
- local tchar = tar.Character
- local tors = tchar:FindFirstChild'Torso'
- local hrp = tchar:FindFirstChild'HumanoidRootPart'
- hrp.CFrame = p.CFrame
- for _,v in pairs(p:GetChildren())do
- if v:IsA'WeldConstraint'then v:Destroy()end
- end
- for _,v in pairs(tchar:GetDescendants())do
- if v:IsA'BasePart'and v.Name~='HumanoidRootPart'then
- v.Transparency = 0
- v.Massless = false
- elseif v:IsA'Humanoid'then
- v.PlatformStand = false
- end
- end
- wait()
- p.CanCollide = false
- p.Anchored = false
- handle.Transparency = 0
- else
- captured = nil
- end
- capture = false
- end
- end
- end
- end
- end)
- end
- workspace.ChildAdded:Connect(function(ch)
- if ch.Name==captured and not capture then
- wait()
- for _,v in pairs(ch:GetDescendants())do
- if v:IsA'BasePart'then
- v.Massless = true
- v.Transparency = 1
- if v.Name=='Torso'then
- v.CFrame = handle.CFrame
- Weldc(handle,v)
- end
- elseif v:IsA'Humanoid'then
- v.PlatformStand = true
- elseif v:IsA'Motor6D'then
- if v.Name~='Neck'and v.Name~='Root'and v.Name~='Waist'
- and v.Name~='RootJoint'then
- v:Destroy()
- end
- elseif v:IsA'Decal'then
- v:Destroy()
- else
- v:Destroy()
- end
- end
- end
- end)
- end
- wait(1)
- Boot_Leg_Poke_Ball(owner) --// InTesting on Pastebin.
Add Comment
Please, Sign In to add comment