plytalent

ghost force

Sep 28th, 2021 (edited)
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. repeat wait() until #game:GetService("Players"):GetPlayers() > 0
  2. local coms = {Instance.new("RemoteEvent",script),Instance.new("RemoteFunction",script)}
  3. local owner = owner or game:GetService("Players"):WaitForChild("plytalent")
  4. local FF = Instance.new("ForceField",owner.Character)
  5. local waitremote = Instance.new('RemoteEvent',script)
  6. local char = Instance.new('ObjectValue',script)
  7. char.Name = "CharacterObjectValue"
  8.  
  9. function createFakeCharacter(DisplayName)
  10.     local Model0 = Instance.new("Model")
  11.     local Part1 = Instance.new("Part")
  12.     local SpecialMesh2 = Instance.new("SpecialMesh")
  13.     local Part3 = Instance.new("Part")
  14.     local Part4 = Instance.new("Part")
  15.     local Part5 = Instance.new("Part")
  16.     local Part6 = Instance.new("Part")
  17.     local Part7 = Instance.new("Part")
  18.     local Humanoid8 = Instance.new("Humanoid")
  19.     local Part9 = Instance.new("Part")
  20.     local CharacterMesh10 = Instance.new("CharacterMesh")
  21.     local Shirt11 = Instance.new("Shirt")
  22.     local Pants12 = Instance.new("Pants")
  23.     local Part13 = Instance.new("Part")
  24.     local SpecialMesh14 = Instance.new("SpecialMesh")
  25.     local AlignOrientation15 = Instance.new("AlignOrientation")
  26.     local AlignPosition16 = Instance.new("AlignPosition")
  27.     local Part17 = Instance.new("Part")
  28.     local SpecialMesh18 = Instance.new("SpecialMesh")
  29.     local AlignOrientation19 = Instance.new("AlignOrientation")
  30.     local AlignPosition20 = Instance.new("AlignPosition")
  31.     local Attachment21 = Instance.new("Attachment")
  32.     local Attachment22 = Instance.new("Attachment")
  33.     local Attachment23 = Instance.new("Attachment")
  34.  
  35.     Attachment21.Name = "Head"
  36.     Attachment22.Name = "Hair"
  37.     Attachment23.Name = "Mask"
  38.     Attachment21.Parent = Part1
  39.     Attachment22.Parent = Part17
  40.     Attachment23.Parent = Part13
  41.  
  42.     Model0.Name = "Ghost"
  43.     Model0.PrimaryPart = Part9
  44.     Part1.Name = "Head"
  45.     Part1.Parent = Model0
  46.     Part1.CFrame = CFrame.new(-51.5, 4.5, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  47.     Part1.Position = Vector3.new(-51.5, 4.5, -53)
  48.     Part1.Color = Color3.new(0.972549, 0.972549, 0.972549)
  49.     Part1.Size = Vector3.new(2, 1, 1)
  50.     Part1.BrickColor = BrickColor.new("Institutional white")
  51.     Part1.Material = Enum.Material.Sand
  52.     Part1.TopSurface = Enum.SurfaceType.Smooth
  53.     Part1.brickColor = BrickColor.new("Institutional white")
  54.     Part1.FormFactor = Enum.FormFactor.Symmetric
  55.     Part1.formFactor = Enum.FormFactor.Symmetric
  56.     SpecialMesh2.Parent = Part1
  57.     SpecialMesh2.Scale = Vector3.new(1.25, 1.25, 1.25)
  58.     Part3.Name = "Torso"
  59.     Part3.Parent = Model0
  60.     Part3.CFrame = CFrame.new(-51.5, 3, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  61.     Part3.Position = Vector3.new(-51.5, 3, -53)
  62.     Part3.Color = Color3.new(0.972549, 0.972549, 0.972549)
  63.     Part3.Size = Vector3.new(2, 2, 1)
  64.     Part3.BrickColor = BrickColor.new("Institutional white")
  65.     Part3.LeftParamA = 0
  66.     Part3.LeftParamB = 0
  67.     Part3.LeftSurface = Enum.SurfaceType.Weld
  68.     Part3.Material = Enum.Material.Sand
  69.     Part3.RightParamA = 0
  70.     Part3.RightParamB = 0
  71.     Part3.RightSurface = Enum.SurfaceType.Weld
  72.     Part3.brickColor = BrickColor.new("Institutional white")
  73.     Part3.FormFactor = Enum.FormFactor.Symmetric
  74.     Part3.formFactor = Enum.FormFactor.Symmetric
  75.     Part4.Name = "Left Arm"
  76.     Part4.Parent = Model0
  77.     Part4.CFrame = CFrame.new(-53, 3, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  78.     Part4.Position = Vector3.new(-53, 3, -53)
  79.     Part4.Color = Color3.new(0.972549, 0.972549, 0.972549)
  80.     Part4.Size = Vector3.new(1, 2, 1)
  81.     Part4.BrickColor = BrickColor.new("Institutional white")
  82.     Part4.CanCollide = false
  83.     Part4.Material = Enum.Material.Sand
  84.     Part4.brickColor = BrickColor.new("Institutional white")
  85.     Part4.FormFactor = Enum.FormFactor.Symmetric
  86.     Part4.formFactor = Enum.FormFactor.Symmetric
  87.     Part5.Name = "Right Arm"
  88.     Part5.Parent = Model0
  89.     Part5.CFrame = CFrame.new(-50, 3, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  90.     Part5.Position = Vector3.new(-50, 3, -53)
  91.     Part5.Color = Color3.new(0.972549, 0.972549, 0.972549)
  92.     Part5.Size = Vector3.new(1, 2, 1)
  93.     Part5.BrickColor = BrickColor.new("Institutional white")
  94.     Part5.CanCollide = false
  95.     Part5.Material = Enum.Material.Sand
  96.     Part5.brickColor = BrickColor.new("Institutional white")
  97.     Part5.FormFactor = Enum.FormFactor.Symmetric
  98.     Part5.formFactor = Enum.FormFactor.Symmetric
  99.     Part6.Name = "Left Leg"
  100.     Part6.Parent = Model0
  101.     Part6.CFrame = CFrame.new(-52, 1, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  102.     Part6.Position = Vector3.new(-52, 1, -53)
  103.     Part6.Color = Color3.new(0.972549, 0.972549, 0.972549)
  104.     Part6.Size = Vector3.new(1, 2, 1)
  105.     Part6.BottomSurface = Enum.SurfaceType.Smooth
  106.     Part6.BrickColor = BrickColor.new("Institutional white")
  107.     Part6.CanCollide = false
  108.     Part6.Material = Enum.Material.Sand
  109.     Part6.brickColor = BrickColor.new("Institutional white")
  110.     Part6.FormFactor = Enum.FormFactor.Symmetric
  111.     Part6.formFactor = Enum.FormFactor.Symmetric
  112.     Part7.Name = "Right Leg"
  113.     Part7.Parent = Model0
  114.     Part7.CFrame = CFrame.new(-51, 1, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  115.     Part7.Position = Vector3.new(-51, 1, -53)
  116.     Part7.Color = Color3.new(0.972549, 0.972549, 0.972549)
  117.     Part7.Size = Vector3.new(1, 2, 1)
  118.     Part7.BottomSurface = Enum.SurfaceType.Smooth
  119.     Part7.BrickColor = BrickColor.new("Institutional white")
  120.     Part7.CanCollide = false
  121.     Part7.Material = Enum.Material.Sand
  122.     Part7.brickColor = BrickColor.new("Institutional white")
  123.     Part7.FormFactor = Enum.FormFactor.Symmetric
  124.     Part7.formFactor = Enum.FormFactor.Symmetric
  125.     Humanoid8.Parent = Model0
  126.     Humanoid8.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
  127.     Humanoid8.HealthDisplayDistance = 0
  128.     Humanoid8.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
  129.     Humanoid8.LeftLeg = Part6
  130.     Humanoid8.NameDisplayDistance = 0
  131.     Humanoid8.RightLeg = Part7
  132.     Humanoid8.Torso = Part9
  133.     Part9.Name = "HumanoidRootPart"
  134.     Part9.Parent = Model0
  135.     Part9.CFrame = CFrame.new(-51.5, 3, -53, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  136.     Part9.Position = Vector3.new(-51.5, 3, -53)
  137.     Part9.Transparency = 1
  138.     Part9.Size = Vector3.new(2, 2, 1)
  139.     Part9.Anchored = false
  140.     Part9.BottomSurface = Enum.SurfaceType.Smooth
  141.     Part9.CanCollide = false
  142.     Part9.LeftParamA = 0
  143.     Part9.LeftParamB = 0
  144.     Part9.Material = Enum.Material.Sand
  145.     Part9.RightParamA = 0
  146.     Part9.RightParamB = 0
  147.     Part9.TopSurface = Enum.SurfaceType.Smooth
  148.     Part9.FormFactor = Enum.FormFactor.Symmetric
  149.     Part9.formFactor = Enum.FormFactor.Symmetric
  150.     CharacterMesh10.Parent = Model0
  151.     CharacterMesh10.BodyPart = Enum.BodyPart.Torso
  152.     CharacterMesh10.MeshId = "rbxassetid://48112070"
  153.     Shirt11.Name = "Shirt"
  154.     Shirt11.Parent = Model0
  155.     Shirt11.ShirtTemplate = "http://www.roblox.com/asset/?id=1210857659"
  156.     Pants12.Name = "Pants"
  157.     Pants12.Parent = Model0
  158.     Pants12.PantsTemplate = "http://www.roblox.com/asset/?id=1210858273"
  159.     Part13.Name = "Mask"
  160.     Part13.Parent = Model0
  161.     Part13.CFrame = CFrame.new(-51.5017433, 4.50454998, -53.0024185, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  162.     Part13.Position = Vector3.new(-51.50174331665, 4.5045499801636, -53.002418518066)
  163.     Part13.Size = Vector3.new(2, 1, 1)
  164.     Part13.BottomSurface = Enum.SurfaceType.Smooth
  165.     Part13.CanCollide = false
  166.     Part13.Material = Enum.Material.Sand
  167.     Part13.TopSurface = Enum.SurfaceType.Smooth
  168.     SpecialMesh14.Name = "SpecialMesh"
  169.     SpecialMesh14.Parent = Part13
  170.     SpecialMesh14.MeshId = "rbxassetid://5728632913"
  171.     SpecialMesh14.TextureId = "http://www.roblox.com/asset/?id=4809181158"
  172.     SpecialMesh14.MeshType = Enum.MeshType.FileMesh
  173.     AlignOrientation15.Parent = Part13
  174.     AlignOrientation15.Attachment0 = Attachment22
  175.     AlignOrientation15.Attachment1 = Attachment21
  176.     AlignOrientation15.RigidityEnabled = true
  177.     AlignPosition16.Parent = Part13
  178.     AlignPosition16.Attachment0 = Attachment22
  179.     AlignPosition16.Attachment1 = Attachment21
  180.     AlignPosition16.RigidityEnabled = true
  181.     Part17.Name = "Hair"
  182.     Part17.Parent = Model0
  183.     Part17.CFrame = CFrame.new(-51.5, 4.5, -53, 1, 9.8568377e-15, -8.08289872e-16, -9.82961152e-15, 0.999588966, 0.0286718253, 1.09057112e-15, -0.0286718253, 0.999588966)
  184.     Part17.Orientation = Vector3.new(-1.6399999856949, 0, 0)
  185.     Part17.Position = Vector3.new(-51.5, 4.5, -53)
  186.     Part17.Rotation = Vector3.new(-1.6399999856949, 0, 0)
  187.     Part17.Size = Vector3.new(2, 1, 1)
  188.     Part17.BottomSurface = Enum.SurfaceType.Smooth
  189.     Part17.CanCollide = false
  190.     Part17.Material = Enum.Material.Sand
  191.     Part17.TopSurface = Enum.SurfaceType.Smooth
  192.     SpecialMesh18.Name = "SpecialMesh"
  193.     SpecialMesh18.Parent = Part17
  194.     SpecialMesh18.MeshId = "rbxassetid://6521980205"
  195.     SpecialMesh18.Offset = Vector3.new(0, -0.80000001192093, 0.20000000298023)
  196.     SpecialMesh18.Scale = Vector3.new(0.94999998807907, 0.95999997854233, 0.91000002622604)
  197.     SpecialMesh18.TextureId = "http://www.roblox.com/asset/?id=6517665515"
  198.     SpecialMesh18.MeshType = Enum.MeshType.FileMesh
  199.     AlignOrientation19.Parent = Part17
  200.     AlignOrientation19.Attachment0 = Attachment23
  201.     AlignOrientation19.Attachment1 = Attachment21
  202.     AlignOrientation19.RigidityEnabled = true
  203.     AlignPosition20.Parent = Part17
  204.     AlignPosition20.Attachment0 = Attachment23
  205.     AlignPosition20.Attachment1 = Attachment21
  206.     AlignPosition20.RigidityEnabled = true
  207.  
  208.     return Model0
  209. end
  210.  
  211. local mainchar = createFakeCharacter(owner.DisplayName)
  212. local conchar = mainchar:Clone()
  213.  
  214. FF.Visible = false
  215.  
  216. local comsfuncs={
  217.     function(plr, partname, partposition, partsize, partorientation)
  218.         if plr ~= owner then
  219.             return
  220.         end
  221.         if owner.Character.Parent then
  222.             owner.Character.Parent = nil
  223.         end
  224.         if not conchar then
  225.             conchar = mainchar:Clone()
  226.             conchar.Parent = workspace
  227.             return
  228.         end
  229.         if not conchar.Parent then
  230.             conchar=nil
  231.             return
  232.         end
  233.         if FF.Parent ~= owner.Character then
  234.             FF = Instance.new("ForceField",owner.Character)
  235.             FF.Visible = false
  236.         end
  237.         conchar.Name = "Ghost"
  238.         local part = conchar:FindFirstChild(partname)
  239.         if not part then
  240.             conchar:Destroy()
  241.             conchar = nil
  242.             return
  243.         end
  244.         if conchar and char.Value ~= conchar then
  245.             char.Value = conchar
  246.         end
  247.         for _,p in pairs(conchar:GetDescendants()) do
  248.             if p:IsA("BasePart") then
  249.                 if p:GetNetworkOwner() ~= owner then
  250.                     p:SetNetworkOwner(owner)
  251.                 end
  252.                 if not p.Massless then
  253.                     p.Massless = true
  254.                 end
  255.             end
  256.         end
  257.         if part then
  258.             if not part:FindFirstChild("PartAlignPos") then
  259.                 part.Position = partposition
  260.                 local AlignPosition = Instance.new("AlignPosition",part)
  261.                 local AlignOrientation = Instance.new("AlignOrientation",part)
  262.                 AlignPosition.Name = "PartAlignPos"
  263.                 AlignOrientation.Name = "PartAlignOri"
  264.                 local attachment0 = Instance.new("Attachment",part)
  265.                 local attachment1 = Instance.new("Attachment",part)
  266.                 attachment1.Name = "attachment1"
  267.                 AlignOrientation.RigidityEnabled = true
  268.                 AlignPosition.RigidityEnabled = true
  269.                 AlignOrientation.Attachment0 = attachment0
  270.                 AlignOrientation.Attachment1 = attachment1
  271.                 AlignPosition.Attachment0 = attachment0
  272.                 AlignPosition.Attachment1 = attachment1
  273.             end
  274.             if partname == "HumanoidRootPart" then
  275.                 part.Transparency = 1
  276.             else
  277.                 part.Transparency = 0.5
  278.             end
  279.             part.Name = partname
  280.             if part:GetNetworkOwner() ~= owner then
  281.                 part:SetNetworkOwner(owner)
  282.             end
  283.         end
  284.     end,
  285.     function(plr)
  286.         if plr ~= owner then
  287.             return
  288.         end
  289.         return conchar
  290.     end
  291. }
  292. coms[1].Name = "Com1"
  293. coms[2].Name = "Com2"
  294. waitremote.Name = "WaitRemote"
  295. coms[2].OnServerInvoke = comsfuncs[2]
  296. coms[1].OnServerEvent:Connect(comsfuncs[1])
  297.  
  298. NLS([==[
  299.     local remote=script.Parent.Com1
  300.     local com1 = script.Parent.Com2
  301.     local owner = owner or game:GetService("Players").LocalPlayer
  302.     local Teleported = false
  303.     game:GetService("RunService").RenderStepped:Connect(function()
  304.         if owner.Character.Parent ~= workspace then
  305.             owner.Character.Parent = workspace
  306.         end
  307.     end)
  308.     local parttable={}
  309.     local FF
  310.     game:GetService("RunService").Stepped:Connect(function()
  311.         if not FF then
  312.             FF = Instance.new("ForceField")
  313.         end
  314.         if not FF.Parent  then
  315.             FF = nil
  316.         end
  317.         if FF then
  318.             FF.Visible = false
  319.         end
  320.         for _, part in pairs(owner.Character:GetChildren()) do
  321.             coroutine.resume(coroutine.create(function()
  322.                 local part = part
  323.                 if part:IsA("BasePart") then
  324.                     remote:FireServer(part.Name, part.Position, part.Size, part.Orientation)
  325.                 end
  326.             end))
  327.         end
  328.     end)
  329.  
  330.     game:GetService("RunService").RenderStepped:Connect(function()
  331.         if com1:InvokeServer() then
  332.             for _,part in pairs(com1:InvokeServer():GetDescendants()) do
  333.                 coroutine.resume(coroutine.create(function()
  334.                     if part:IsA("BasePart") then
  335.                         part.CanCollide = false
  336.                         if part:FindFirstChild("attachment1") then
  337.                             part.attachment1.Parent = owner.Character[part.Name]
  338.                             part.Position = owner.Character[part.Name].Position
  339.                         else
  340.                             if owner.Character:FindFirstChild(part.Name) then
  341.                                 if not Teleported then
  342.                                     part.PartAlignPos.RigidityEnabled = not part.PartAlignPos.RigidityEnabled
  343.                                 end
  344.                             end
  345.                         end
  346.                     elseif part:IsA("Humanoid") then
  347.                         part:Destroy()
  348.                     end
  349.                 end))
  350.             end
  351.         end
  352.     end)
  353.     local player = owner or game:GetService("Players").LocalPlayer
  354.     local mouse = player:GetMouse()
  355.     mouse.KeyDown:Connect(function(k)
  356.         if k == "n" then
  357.             player.Character:SetPrimaryPartCFrame(mouse.Hit * CFrame.new(0,4,0))
  358.             Teleported = true
  359.             wait(1)
  360.             Teleported = false
  361.         end
  362.     end)
  363.     script.Parent.WaitRemote:FireServer()
  364. ]==],script)
  365.  
  366. game:GetService("RunService").Heartbeat:Connect(function()
  367.     for i=1,#coms do
  368.         if not coms[i].Parent then
  369.             local ClassName = coms[i].ClassName
  370.             coms[i] = Instance.new(ClassName,script)
  371.             if ClassName == "RemoteEvent" then
  372.                 coms[i].OnServerEvent:Connect(comsfuncs[i])
  373.             elseif ClassName == "RemoteFunction" then
  374.                 coms[i].OnServerInvoke = comsfuncs[i]
  375.             end
  376.         end
  377.         if coms[i].Name ~= "Com" .. tostring(i) then
  378.             coms[i].Name = "Com" .. tostring(i)
  379.         end
  380.     end
  381. end)
  382. script.Parent = owner.PlayerGui
  383. print("waiting")
  384. waitremote.OnServerEvent:Wait()
  385. print("Destroy! wait remote")
  386. waitremote:Destroy()
  387. owner.Character.Parent = nil
  388.  
  389. local rolandscript=NS([===[
  390.     local part = nil
  391. local dwn = false
  392. local mouse_fd = Instance.new("Folder",script)
  393. mouse_fd.Name = "Mouse"
  394. local m1d,m1u,kd,updateposition = Instance.new("RemoteEvent",mouse_fd), Instance.new("RemoteEvent",mouse_fd), Instance.new("RemoteEvent",mouse_fd), Instance.new("RemoteEvent",mouse_fd)
  395. m1d.Name = "Button1Down"
  396. m1u.Name = "Button1Up"
  397. kd.Name = "KeyDown"
  398. local oldownership = nil
  399. updateposition.Name = "Update_Hit_Target"
  400. local mouse = {
  401.     ["Button1Down"]=m1d.OnServerEvent,
  402.     ["Button1Up"]=m1u.OnServerEvent,
  403.     ["KeyDown"]=kd.OnServerEvent,
  404.     Hit = CFrame.new(0,0,0),
  405.     Target = nil
  406. }
  407. updateposition.OnServerEvent:Connect(function(plr,hit,target)
  408.     if plr ~= owner then
  409.         return
  410.     end
  411.     mouse.hit = hit
  412.     mouse.Hit = hit
  413.     mouse.target = target
  414.     mouse.Target = target
  415. end)
  416. mouse.KeyDown:Connect(function(plr,k)
  417.     if plr ~= owner then
  418.         return
  419.     end
  420.     if k == "t" and part ~= nil then
  421.         local clone = part:Clone()
  422.         clone.Parent = workspace
  423.         clone.Anchored = false
  424.         clone:ClearAllChildren()
  425.         clone.CanCollide = true
  426.         bp.Parent = clone
  427.         if part.Parent:FindFirstChildOfClass("Humanoid") then
  428.             part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false
  429.         end
  430.         part:Destroy()
  431.         part = clone
  432.     end
  433. end)
  434.  
  435. mouse.Button1Down:Connect(function(plr)
  436.     if plr ~= owner then
  437.         return
  438.     end
  439.     if mouse ~= nil then
  440.         if mouse.Target ~= nil then
  441.             part = mouse.Target
  442.             if not part.Anchored and part:IsDescendantOf(workspace) then
  443.                 oldownership = part:GetNetworkOwner()
  444.             end
  445.             bp = Instance.new("BodyPosition",part)
  446.             bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  447.             bp.Position = part.Position
  448.             dwn = true
  449.         end
  450.     end
  451.     while dwn do
  452.         game:GetService("RunService").Stepped:Wait()
  453.         bp.Position = mouse.Hit.p
  454.         if part then
  455.             if not part.Anchored and part:IsDescendantOf(workspace) then
  456.                 if part:GetNetworkOwner() ~= owner then
  457.                     part:SetNetworkOwner(owner)
  458.                 end
  459.             end
  460.             if part.Parent:FindFirstChildOfClass("Humanoid") then
  461.                 part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
  462.             end
  463.         end
  464.     end
  465. end)
  466.  
  467. mouse.Button1Up:Connect(function(plr)
  468.     if plr ~= owner then
  469.         return
  470.     end
  471.     dwn = false
  472.     if part then
  473.         if part.Parent:FindFirstChildOfClass("Humanoid") then
  474.             part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false
  475.         end
  476.         if not part.Anchored and part:IsDescendantOf(workspace) then
  477.             if part:GetNetworkOwner() ~= oldownership then
  478.                 part:SetNetworkOwner(oldownership)
  479.             end
  480.         end
  481.         part = nil
  482.     end
  483.     if bp then
  484.         bp:Destroy()
  485.     end
  486. end)
  487. NLS([====[
  488.     local UpdateMouse = script.Parent.Mouse.Update_Hit_Target
  489.     local M1Down = script.Parent.Mouse.Button1Down
  490.     local M1Up = script.Parent.Mouse.Button1Up
  491.     local KDown = script.Parent.Mouse.KeyDown
  492.  
  493.     local mouse = owner:GetMouse()
  494.     local lasthit,lasttarget = mouse.Hit,mouse.Target
  495.     mouse.KeyDown:Connect(function(k)
  496.         KDown:FireServer(k)
  497.     end)
  498.     mouse.Button1Down:Connect(function()
  499.         M1Down:FireServer()
  500.     end)
  501.     mouse.Button1Up:Connect(function()
  502.         M1Up:FireServer()
  503.     end)
  504.     game:GetService("RunService").Heartbeat:Connect(function()
  505.         if mouse.Hit ~= lasthit or mouse.Target ~=lasttarget then
  506.             UpdateMouse:FireServer(mouse.Hit,mouse.Target)
  507.         end
  508.     end)
  509. ]====],script)
  510. print("Ready!")
  511. ]===],script)
  512. rolandscript.Name = "Force"
  513. local animationroland = NLS([=[
  514.     local Player = owner or game:GetService("Players").LocalPlayer
  515.  
  516.     local Character = Player.Character
  517.     local Torso = Character.Torso
  518.     local Humanoid = Character.Humanoid
  519.     local LeftArm = Character["Left Arm"]
  520.     local LeftLeg = Character["Left Leg"]
  521.     local RightArm = Character["Right Arm"]
  522.     local RightLeg = Character["Right Leg"]
  523.     local LS = Torso["Left Shoulder"]
  524.     local LH = Torso["Left Hip"]
  525.     local RS = Torso["Right Shoulder"]
  526.     local RH = Torso["Right Hip"]
  527.     local Neck = Torso.Neck
  528.     local RootPart = Character.HumanoidRootPart
  529.     local RootJoint = RootPart.RootJoint
  530.  
  531.     local cf = CFrame.new
  532.     local angles = CFrame.Angles
  533.     local ROOTC0 =  RootJoint.C0
  534.     local NECKC0 = Torso.Neck.C0
  535.     local COS = math.cos
  536.     local ACOS = math.acos
  537.     local SIN = math.sin
  538.     local ASIN = math.asin
  539.     local ABS = math.abs
  540.     local MRANDOM = math.random
  541.     local FLOOR = math.floor
  542.     local euler=CFrame.fromEulerAnglesXYZ
  543.     local angles=CFrame.Angles
  544.  
  545.  
  546.     RW, LW=Instance.new("Weld"), Instance.new("Weld")
  547.     RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  548.     LH=Torso["Left Hip"]
  549.     RH=Torso["Right Hip"]
  550.  
  551.     RootCF=euler(-1.57,0,3.14)
  552.     necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  553.  
  554.     RSH=Character.Torso["Right Shoulder"]
  555.     LSH=Character.Torso["Left Shoulder"]
  556.  
  557.     RSH.Parent=nil
  558.     LSH.Parent=nil
  559.  
  560.     RW.Name="Right Shoulder"
  561.     RW.Part0=Character.Torso
  562.     RW.C0=cf(1.5, 0.5, 0)
  563.     RW.C1=cf(0, 0.5, 0)
  564.     RW.Part1=Character["Right Arm"]
  565.     RW.Parent=Character.Torso
  566.  
  567.     LW.Name="Left Shoulder"
  568.     LW.Part0=Character.Torso
  569.     LW.C0=cf(-1.5, 0.5, 0)
  570.     LW.C1=cf(0, 0.5, 0)
  571.     LW.Part1=Character["Left Arm"]
  572.     LW.Parent=Character.Torso
  573.  
  574.     function QuaternionSlerp(a, b, t)
  575.         local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  576.         local startInterp, finishInterp;
  577.         if cosTheta >= 0.0001 then
  578.             if (1 - cosTheta) > 0.0001 then
  579.                 local theta = math.acos(cosTheta)
  580.                 local invSinTheta = 1/math.sin(theta)
  581.                 startInterp = math.sin((1-t)*theta)*invSinTheta
  582.                 finishInterp = math.sin(t*theta)*invSinTheta  
  583.             else
  584.                 startInterp = 1-t
  585.                 finishInterp = t
  586.             end
  587.         else
  588.             if (1+cosTheta) > 0.0001 then
  589.                 local theta = math.acos(-cosTheta)
  590.                 local invSinTheta = 1/math.sin(theta)
  591.                 startInterp = math.sin((t-1)*theta)*invSinTheta
  592.                 finishInterp = math.sin(t*theta)*invSinTheta
  593.             else
  594.                 startInterp = t-1
  595.                 finishInterp = t
  596.             end
  597.         end
  598.         return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  599.     end
  600.  
  601.     function Clerp(a,b,t)
  602.         local qa = {QuaternionFromCFrame(a)}
  603.         local qb = {QuaternionFromCFrame(b)}
  604.         local ax, ay, az = a.x, a.y, a.z
  605.         local bx, by, bz = b.x, b.y, b.z
  606.         local _t = 1-t
  607.         return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  608.     end
  609.  
  610.     function QuaternionFromCFrame(cf)
  611.         local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  612.         local trace = m00 + m11 + m22
  613.         if trace > 0 then
  614.             local s = math.sqrt(1 + trace)
  615.             local recip = 0.5/s
  616.             return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  617.         else
  618.             local i = 0
  619.             if m11 > m00 then
  620.                 i = 1
  621.             end
  622.             if m22 > (i == 0 and m00 or m11) then
  623.                 i = 2
  624.             end
  625.             if i == 0 then
  626.                 local s = math.sqrt(m00-m11-m22+1)
  627.                 local recip = 0.5/s
  628.                 return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  629.             elseif i == 1 then
  630.                 local s = math.sqrt(m11-m22-m00+1)
  631.                 local recip = 0.5/s
  632.                 return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  633.             elseif i == 2 then
  634.                 local s = math.sqrt(m22-m00-m11+1)
  635.                 local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  636.             end
  637.         end
  638.     end
  639.  
  640.     function QuaternionToCFrame(px, py, pz, x, y, z, w)
  641.         local xs, ys, zs = x + x, y + y, z + z
  642.         local wx, wy, wz = w*xs, w*ys, w*zs
  643.         local xx = x*xs
  644.         local xy = x*ys
  645.         local xz = x*zs
  646.         local yy = y*ys
  647.         local yz = y*zs
  648.         local zz = z*zs
  649.         return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  650.     end
  651.  
  652.  
  653.     local function CFrameFromTopBack(at, top, back)
  654.         local right = top:Cross(back)
  655.         return CFrame.new(
  656.             at.x, at.y, at.z,
  657.             right.x, top.x, back.x,
  658.             right.y, top.y, back.y,
  659.             right.z, top.z, back.z
  660.         )
  661.     end
  662.  
  663.     function rayCast(Pos, Dir, Max, Ignore)
  664.         return game:service("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Pos, Dir.unit * (Max or math.huge)), Ignore)
  665.     end
  666.  
  667.     local destroy_animate = true
  668.     local currentsine = 0
  669.  
  670.     function animation(sine)
  671.         local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  672.         local hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,{Character, script.Parent.Parent.CharacterObjectValue.Value})
  673.         if hitfloor then
  674.             if Character:FindFirstChild("Animate") and destroy_animate then
  675.                 destroy_animate=false
  676.                 wait(1)
  677.                 Character:FindFirstChild("Animate"):Destroy()
  678.             end
  679.         end
  680.         if RootPart.Velocity.y > 1 and hitfloor==nil then
  681.             RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1)
  682.             LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1)
  683.             RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine/25))*angles(math.rad(-10),math.rad(0),math.rad(0)),.1)
  684.             Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
  685.             RW.C0=Clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-5),math.rad(0),math.rad(25)),.1)
  686.             LW.C0=Clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-5),math.rad(0),math.rad(-25)),.1)
  687.         elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  688.             RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1)
  689.             LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1)
  690.             RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine/25))*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
  691.             Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
  692.             RW.C0=Clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-20),math.rad(0),math.rad(50)),.1)
  693.             LW.C0=Clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-20),math.rad(0),math.rad(-50)),.1)
  694.         elseif torvel<1 and hitfloor~=nil then
  695.             RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(sine / 34))),.1)
  696.             LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(sine / 34))),.1)
  697.             RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 28))*angles(math.rad(0 - 1 * math.cos(sine / 34)),math.rad(0),math.rad(0)),.1)
  698.             Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(22.5 - 2.5 * math.cos(sine / 28)),math.rad(0),math.rad(0)),.1)
  699.             RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
  700.             LW.C0=Clerp(LW.C0,cf(-1.5,0.5 + 0.1 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
  701.         elseif torvel>2 and hitfloor~=nil then
  702.             RH.C0=Clerp(RH.C0,cf(1,-0.85,-0.15 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0 + 5 * math.cos(sine / 8)),math.rad(0 + 25 * math.cos(sine / 8))),.1)
  703.             LH.C0=Clerp(LH.C0,cf(-1,-0.85,-0.15 + 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0 + 5 * math.cos(sine / 8)),math.rad(0 + 25 * math.cos(sine / 8))),.1)
  704.             RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,-0.15 - 0.1 * math.cos(sine / 4))*angles(math.rad(5),math.rad(0),math.rad(0 - 5 * math.cos(sine / 8))),.1)
  705.             Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(10 + 2.5 * math.cos(sine / 100)),math.rad(0),math.rad(0 + 5 * math.cos(sine / 8))),.1)
  706.             RW.C0=Clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0 - 10 * math.cos(sine / 8)),math.rad(0),math.rad(10 - 10 * math.cos(sine / 4))),.1)
  707.             LW.C0=Clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0 + 10 * math.cos(sine / 8)),math.rad(0),math.rad(-10 + 10 * math.cos(sine / 4))),.1)
  708.         end
  709.     end
  710.     game:GetService("RunService").RenderStepped:Connect(function(delta)
  711.         currentsine = currentsine + (25*delta)
  712.         animation(currentsine)
  713.     end)
  714. ]=],rolandscript)
  715. animationroland.Name = "Animate"
Add Comment
Please, Sign In to add comment