Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Copyright 2019 - 2020, applebee and the LumbSmasher contributors
- This source is controlled by the AGPLv3 License.
- Permissions of this strongest copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license.
- Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available.
- More info here: https://www.gnu.org/licenses/agpl-3.0.en.html
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
- ]]--
- function lumbsmasher_teleport(destination_cframe)
- local localplayer = game.Players.LocalPlayer
- local character=localplayer.Character
- local humanoid=character.Humanoid
- local can_collide = {}
- local connection = character.Torso.Touched:connect(function(t)
- if t.CanCollide == true then
- t.CanCollide = false
- table.insert(can_collide, t)
- end
- end)
- local thrust = Instance.new("BodyPosition", character.Torso)
- thrust.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- thrust.Position = destination_cframe.p
- thrust.P = 100000
- repeat
- wait()
- until
- (character.Torso.CFrame.p - destination_cframe.p).magnitude <10
- thrust:Destroy()
- connection:Disconnect()
- for i, v in pairs(can_collide) do
- v.CanCollide=true
- end
- local no_movement = Vector3.new(0,0,0)
- repeat
- wait()
- character.HumanoidRootPart.Velocity = no_movement
- humanoid:ChangeState(11)
- until character.Torso.Velocity == no_movement
- for i=0, 10 do
- wait()
- character.HumanoidRootPart.CFrame = destination_cframe
- end
- tping = false
- end
- tping = false
- local mouse = game.Players.LocalPlayer:GetMouse()
- mouse.KeyDown:Connect(function(key)
- if key == "t" and mouse.Target then
- if tping == true then return end
- tping = true
- lumbsmasher_teleport(CFrame.new(mouse.Hit.p) + Vector3.new(0,5,0))
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement