Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tool = Instance.new("Tool",game.Players.LocalPlayer.Backpack)
- tool.Name = "Teke"
- tool.RequiresHandle = false
- objmodel = Instance.new("ObjectValue")
- objmodel.Name = "OBJ"
- objmodel.Parent = game.Players.LocalPlayer.Character
- function equip()
- equipped = true
- end
- function unequip()
- equipped = false
- end
- equipped = false
- tool.Equipped:connect(equip)
- tool.Unequipped:connect(unequip)
- function unteke()
- player = game.Players.LocalPlayer
- mouse = player:GetMouse()
- target = mouse.Target
- object = player.Character.OBJ.Value
- if object ~= nil then
- object.Anchored = false
- if object:FindFirstChild("TEKECONTROL") then
- object.TEKECONTROL:Remove()
- end
- end
- player.Character.OBJ.Value = nil
- end
- tool.Unequipped:connect(unteke)
- function teke()
- player = game.Players.LocalPlayer
- mouse = player:GetMouse()
- target = mouse.Target
- if target ~= nil and player.Character:FindFirstChild("Torso") then
- notfound = true
- for i,v in pairs(game.Players:GetChildren()) do
- if v:FindFirstChild("OBJ") then
- if v.OBJ.Value == target then
- notfound = false
- end
- end
- end
- if target.Anchored == false and notfound == true then
- unteke()
- player.Character.OBJ.Value = target
- control = Instance.new("BodyPosition")
- control.Name = "TEKECONTROL"
- torso = player.Character.Torso
- tpos = target.Position
- control.Position = Vector3.new(tpos.X,tpos.Y + 5,tpos.Z)
- control.Parent = target
- control.MaxForce = Vector3.new(0,100000,0)
- control.P = 10000
- end
- end
- end
- tool.Activated:connect(teke)
- function keypress(inputObject,gameProcessedEvent)
- if not gameProcessedEvent and equipped == true then
- if inputObject.KeyCode == Enum.KeyCode.R then
- local object = player.Character.OBJ.Value
- if object ~= nil then
- if object.Anchored == false then
- object.Anchored = true
- else
- object.Anchored = false
- end
- end
- end
- if inputObject.KeyCode == Enum.KeyCode.T then
- local object = player.Character.OBJ.Value
- if object ~= nil then
- object.TEKECONTROL.Position = object.TEKECONTROL.Position + Vector3.new(0,10,0)
- end
- end
- if inputObject.KeyCode == Enum.KeyCode.Z then
- local object = player.Character.OBJ.Value
- if object ~= nil then
- velocity = Instance.new("BodyVelocity",object)
- velocity.Velocity = player.Character.Torso.CFrame.lookVector * 100 + Vector3.new(0,20,0)
- velocity.MaxForce = Vector3.new(1000000,1000000,1000000)
- game:GetService("Debris"):AddItem(velocity,0.1)
- end
- if object.Parent:FindFirstChild("Humanoid") then
- object.Parent.Humanoid.Sit = true
- end
- object.TEKECONTROL:Remove()
- player.OBJ.Character.Value = nil
- end
- if inputObject.KeyCode == Enum.KeyCode.X then
- local object = player.Character.OBJ.Value
- if object ~= nil then
- velocity = Instance.new("BodyVelocity",object)
- velocity.Velocity = player.Character.Torso.CFrame.lookVector * 300 + Vector3.new(0,20,0)
- velocity.MaxForce = Vector3.new(1000000,1000000,1000000)
- game:GetService("Debris"):AddItem(velocity,0.1)
- end
- if object.Parent:FindFirstChild("Humanoid") then
- object.Parent.Humanoid.Sit = true
- end
- object.TEKECONTROL:Remove()
- player.Character.OBJ.Value = nil
- end
- if inputObject.KeyCode == Enum.KeyCode.B then
- local object = player.Character.OBJ.Value
- print("pls")
- if object ~= nil then
- print("its something ;-;")
- object.TEKECONTROL.Position = (player.Character.Torso.CFrame * CFrame.new(0,0,-10)).p
- object.TEKECONTROL.MaxForce = Vector3.new(1000000,1000000,1000000)
- end
- end
- if inputObject.KeyCode == Enum.KeyCode.K then
- local object = player.Character.OBJ.Value
- if object ~= nil then
- clone = object:clone()
- clone.CanCollide = true
- object:Remove()
- clone.CFrame = object.CFrame
- clone.Parent = game.Workspace
- player.Character.OBJ.Value = clone
- object.TEKECONTROL.Parent = clone
- end
- end
- end
- end
- game:GetService("UserInputService").InputBegan:connect(keypress)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement