Advertisement
samuelrichter66

ufo

Jun 8th, 2019
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6.     print("FE Compatibility code V2 by Mokiros")
  7.     local RealPlayer = RealPlayer
  8.     script.Parent = RealPlayer.Character
  9.  
  10.     --Fake event to make stuff like Mouse.KeyDown work
  11.     local Disconnect_Function = function(this)
  12.         this[1].Functions[this[2]] = nil
  13.     end
  14.     local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15.     local FakeEvent_Metatable = {__index={
  16.         Connect = function(this,f)
  17.             local i = tostring(math.random(0,10000))
  18.             while this.Functions[i] do
  19.                 i = tostring(math.random(0,10000))
  20.             end
  21.             this.Functions[i] = f
  22.             return setmetatable({this,i},Disconnect_Metatable)
  23.         end
  24.     }}
  25.     FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26.     local function fakeEvent()
  27.         return setmetatable({Functions={}},FakeEvent_Metatable)
  28.     end
  29.  
  30.     --Creating fake input objects with fake variables
  31.     local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32.     FakeMouse.keyUp = FakeMouse.KeyUp
  33.     FakeMouse.keyDown = FakeMouse.KeyDown
  34.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37.     end}
  38.     --Merged 2 functions into one by checking amount of arguments
  39.     CAS.UnbindAction = CAS.BindAction
  40.  
  41.     --This function will trigger the events that have been :Connect()'ed
  42.     local function TriggerEvent(self,ev,...)
  43.         for _,f in pairs(self[ev].Functions) do
  44.             f(...)
  45.         end
  46.     end
  47.     FakeMouse.TriggerEvent = TriggerEvent
  48.     UIS.TriggerEvent = TriggerEvent
  49.  
  50.     --Client communication
  51.     local Event = Instance.new("RemoteEvent")
  52.     Event.Name = "UserInput_Event"
  53.     Event.OnServerEvent:Connect(function(plr,io)
  54.         if plr~=RealPlayer then return end
  55.         FakeMouse.Target = io.Target
  56.         FakeMouse.Hit = io.Hit
  57.         if not io.isMouse then
  58.             local b = io.UserInputState == Enum.UserInputState.Begin
  59.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60.                 return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61.             end
  62.             if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63.                 return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64.             end
  65.             for _,t in pairs(CAS.Actions) do
  66.                 for _,k in pairs(t.Keys) do
  67.                     if k==io.KeyCode then
  68.                         t.Function(t.Name,io.UserInputState,io)
  69.                     end
  70.                 end
  71.             end
  72.             FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73.             UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74.         end
  75.     end)
  76.     Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77.     local Mouse = owner:GetMouse()
  78.     local UIS = game:GetService("UserInputService")
  79.     local input = function(io,RobloxHandled)
  80.         if RobloxHandled then return end
  81.         --Since InputObject is a client-side instance, we create and pass table instead
  82.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83.     end
  84.     UIS.InputBegan:Connect(input)
  85.     UIS.InputEnded:Connect(input)
  86.  
  87.     local h,t
  88.     --Give the server mouse data every second frame, but only if the values changed
  89.     --If player is not moving their mouse, client won't fire events
  90.     local HB = game:GetService("RunService").Heartbeat
  91.     while true do
  92.         if h~=Mouse.Hit or t~=Mouse.Target then
  93.             h,t=Mouse.Hit,Mouse.Target
  94.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  95.         end
  96.         --Wait 2 frames
  97.         for i=1,2 do
  98.             HB:Wait()
  99.         end
  100.     end]==],script)
  101.  
  102.     ----Sandboxed game object that allows the usage of client-side methods and services
  103.     --Real game object
  104.     local RealGame = game
  105.  
  106.     --Metatable for fake service
  107.     local FakeService_Metatable = {
  108.         __index = function(self,k)
  109.             local s = rawget(self,"_RealService")
  110.             if s then
  111.                 return typeof(s[k])=="function"
  112.                 and function(_,...)return s[k](s,...)end or s[k]
  113.             end
  114.         end,
  115.         __newindex = function(self,k,v)
  116.             local s = rawget(self,"_RealService")
  117.             if s then s[k]=v end
  118.         end
  119.     }
  120.     local function FakeService(t,RealService)
  121.         t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122.         return setmetatable(t,FakeService_Metatable)
  123.     end
  124.  
  125.     --Fake game object
  126.     local FakeGame = {
  127.         GetService = function(self,s)
  128.             return rawget(self,s) or RealGame:GetService(s)
  129.         end,
  130.         Players = FakeService({
  131.             LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132.         },"Players"),
  133.         UserInputService = FakeService(UIS,"UserInputService"),
  134.         ContextActionService = FakeService(CAS,"ContextActionService"),
  135.         RunService = FakeService({
  136.             _btrs = {},
  137.             RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138.             BindToRenderStep = function(self,name,_,fun)
  139.                 self._btrs[name] = self.Heartbeat:Connect(fun)
  140.             end,
  141.             UnbindFromRenderStep = function(self,name)
  142.                 self._btrs[name]:Disconnect()
  143.             end,
  144.         },"RunService")
  145.     }
  146.     rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147.     FakeGame.service = FakeGame.GetService
  148.     FakeService(FakeGame,game)
  149.     --Changing owner to fake player object to support owner:GetMouse()
  150.     game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153.  
  154.  
  155.  
  156. if game.Players.LocalPlayer.PlayerGui:FindFirstChild('ufo') then
  157.     game.Players.LocalPlayer.PlayerGui.ufo:Destroy()
  158.     if game.Workspace:FindFirstChild('ufoparthaha') then
  159.         game.Workspace.ufoparthaha:Destroy()
  160.     end
  161. end
  162. wait()
  163. local VanGui = Instance.new("ScreenGui")
  164. local Van = Instance.new("Frame")
  165. local idk = Instance.new("TextBox")
  166. local dsa = Instance.new("TextButton")
  167.  
  168. VanGui.Name = "ufo"
  169. VanGui.Parent = game.Players.LocalPlayer.PlayerGui
  170.  
  171. Van.Name = "ufo"
  172. Van.Parent = VanGui
  173. Van.BackgroundColor3 = Color3.new(0.235294, 0.235294, 0.235294)
  174. Van.BorderColor3 = Color3.new(0, 0, 0)
  175. Van.Position = UDim2.new(0, 5, 0.8, 0)
  176. Van.Size = UDim2.new(0, 200, 0, 45)
  177.  
  178. idk.Name = "idk"
  179. idk.Parent = Van
  180. idk.BackgroundColor3 = Color3.new(0.235294, 0.235294, 0.235294)
  181. idk.BorderColor3 = Color3.new(0, 0, 0)
  182. idk.Size = UDim2.new(1, 0, 0, 20)
  183. idk.Font = Enum.Font.SciFi
  184. idk.FontSize = Enum.FontSize.Size14
  185. idk.Text = "Username"
  186. idk.TextColor3 = Color3.new(1, 1, 1)
  187. idk.TextScaled = true
  188. idk.TextStrokeTransparency = 0
  189. idk.TextWrapped = true
  190.  
  191. dsa.Name = "dsa"
  192. dsa.Parent = Van
  193. dsa.BackgroundColor3 = Color3.new(0.235294, 0.235294, 0.235294)
  194. dsa.BorderColor3 = Color3.new(0, 0, 0)
  195. dsa.Position = UDim2.new(0, 0, 1, -25)
  196. dsa.Size = UDim2.new(1, 0, 0, 25)
  197. dsa.Font = Enum.Font.SciFi
  198. dsa.FontSize = Enum.FontSize.Size14
  199. dsa.Text = "UFO"
  200. dsa.TextColor3 = Color3.new(1, 1, 1)
  201. dsa.TextScaled = true
  202. dsa.TextStrokeTransparency = 0
  203. dsa.TextWrapped = true
  204.  
  205.  
  206. dsa.MouseButton1Click:connect(function()
  207.     Victim = idk.Text
  208.     if game.Players:FindFirstChild(Victim) and game.Workspace:FindFirstChild('ufoparthaha') == nil then
  209.  
  210.         local music1 = Instance.new("Sound",game.Workspace)
  211.         music1.SoundId = "rbxassetid://144072631"
  212.         music1.Volume = 3
  213.         music1:Play()
  214.         local u1 = Instance.new('Part')
  215.         u1.Name = 'ufoparthaha'
  216.         u1.Parent = game.Workspace
  217.         u1.Material = Enum.Material.DiamondPlate
  218.         u1.Anchored = true
  219.         u1.Size = Vector3.new(20,3,20)
  220.         u1.CFrame = CFrame.new(0,50,0)
  221.         local u2 = Instance.new('SpecialMesh')
  222.         u2.Parent = u1
  223.         u2.MeshType = Enum.MeshType.Sphere
  224.         local u3 = Instance.new('Part')
  225.         u3.Parent = u1
  226.         u3.Material = Enum.Material.SmoothPlastic
  227.         u3.Anchored = true
  228.         u3.Size = Vector3.new(15,10,15)
  229.         u3.CFrame = CFrame.new(0,54,0)
  230.         u3.Transparency = 0.6
  231.         u3.BrickColor = BrickColor.new('Cyan')
  232.         local u4 = Instance.new('SpecialMesh')
  233.         u4.Parent = u3
  234.         local u5 = Instance.new('Part')
  235.         u5.Parent = u1
  236.         u5.Material = Enum.Material.Neon
  237.         u5.Anchored = true
  238.         u5.Size = Vector3.new(5,1,5)
  239.         u5.CFrame = CFrame.new(0,49,0)
  240.         u5.Transparency = 0.7
  241.         u5.BrickColor = BrickColor.new('Toothpaste')
  242.         u5.CanCollide = false
  243.         local u6 = Instance.new('Part')
  244.         u6.CFrame = CFrame.new(0,5,0)
  245.         u6.Parent = u1
  246.         u6.Anchored = true
  247.         u6.CanCollide = false
  248.         u6.Transparency = 1
  249.         local u7 = Instance.new('Part')
  250.         u7.CFrame = CFrame.new(0,8,0)
  251.         u7.Parent = u1
  252.         u7.Anchored = true
  253.         u7.CanCollide = false
  254.         u7.Transparency = 1
  255.         local u8 = Instance.new('Part')
  256.         u8.CFrame = CFrame.new(0,11,0)
  257.         u8.Parent = u1
  258.         u8.Anchored = true
  259.         u8.CanCollide = false
  260.         u8.Transparency = 1
  261.         local u9 = Instance.new('Part')
  262.         u9.CFrame = CFrame.new(0,14,0)
  263.         u9.Parent = u1
  264.         u9.Anchored = true
  265.         u9.CanCollide = false
  266.         u9.Transparency = 1
  267.         local u10 = Instance.new('Part')
  268.         u10.CFrame = CFrame.new(0,17,0)
  269.         u10.Parent = u1
  270.         u10.Anchored = true
  271.         u10.CanCollide = false
  272.         u10.Transparency = 1
  273.         local u11 = Instance.new('Part')
  274.         u11.CFrame = CFrame.new(0,20,0)
  275.         u11.Parent = u1
  276.         u11.Anchored = true
  277.         u11.CanCollide = false
  278.         u11.Transparency = 1
  279.         local u12 = Instance.new('Part')
  280.         u12.CFrame = CFrame.new(0,23,0)
  281.         u12.Parent = u1
  282.         u12.Anchored = true
  283.         u12.CanCollide = false
  284.         u12.Transparency = 1
  285.         local u13 = Instance.new('Part')
  286.         u13.CFrame = CFrame.new(0,26,0)
  287.         u13.Parent = u1
  288.         u13.Anchored = true
  289.         u13.CanCollide = false
  290.         u13.Transparency = 1
  291.         local u14 = Instance.new('Part')
  292.         u14.CFrame = CFrame.new(0,29,0)
  293.         u14.Parent = u1
  294.         u14.Anchored = true
  295.         u14.CanCollide = false
  296.         u14.Transparency = 1
  297.         local u15 = Instance.new('Part')
  298.         u15.CFrame = CFrame.new(0,32,0)
  299.         u15.Parent = u1
  300.         u15.Anchored = true
  301.         u15.CanCollide = false
  302.         u15.Transparency = 1
  303.         local u16 = Instance.new('Part')
  304.         u16.CFrame = CFrame.new(0,35,0)
  305.         u16.Parent = u1
  306.         u16.Anchored = true
  307.         u16.CanCollide = false
  308.         u16.Transparency = 1
  309.         local u17 = Instance.new('Part')
  310.         u17.CFrame = CFrame.new(0,38,0)
  311.         u17.Parent = u1
  312.         u17.Anchored = true
  313.         u17.CanCollide = false
  314.         u17.Transparency = 1
  315.         local u18 = Instance.new('Part')
  316.         u18.CFrame = CFrame.new(0,41,0)
  317.         u18.Parent = u1
  318.         u18.Anchored = true
  319.         u18.CanCollide = false
  320.         u18.Transparency = 1
  321.         local u19 = Instance.new('Part')
  322.         u19.CFrame = CFrame.new(0,44,0)
  323.         u19.Parent = u1
  324.         u19.Anchored = true
  325.         u19.CanCollide = false
  326.         u19.Transparency = 1
  327.         local u20 = Instance.new('Part')
  328.         u20.CFrame = CFrame.new(0,47,0)
  329.         u20.Parent = u1
  330.         u20.Anchored = true
  331.         u20.CanCollide = false
  332.         u20.Transparency = 1
  333.         local u21 = Instance.new('Part')
  334.         u21.CFrame = CFrame.new(0,50,0)
  335.         u21.Parent = u1
  336.         u21.Anchored = true
  337.         u21.CanCollide = false
  338.         u21.Transparency = 1
  339.         local u22 = Instance.new('Part')
  340.         u22.CFrame = CFrame.new(0,53,0)
  341.         u22.Parent = u1
  342.         u22.Anchored = true
  343.         u22.CanCollide = false
  344.         u22.Transparency = 1
  345.         local u23 = Instance.new('Part')
  346.         u23.CFrame = CFrame.new(0,54,0)
  347.         u23.Parent = u1
  348.         u23.Anchored = true
  349.         u23.CanCollide = false
  350.         u23.Transparency = 1
  351.         function tractordown()
  352.             for i=1, 47 do
  353.             local cf = u5.CFrame
  354.             u5.Size = u5.Size + Vector3.new(0,1,0)
  355.             u5.CFrame = cf - Vector3.new(0,0.5,0)
  356.             wait()
  357.             end
  358.         end
  359.         function tractorup()
  360.             for i=1, 47 do
  361.             local cf = u5.CFrame
  362.             u5.Size = u5.Size - Vector3.new(0,1,0)
  363.             u5.CFrame = cf + Vector3.new(0,0.5,0)
  364.             wait()
  365.             end
  366.         end
  367. function MoveX(model, Position)
  368. model.CFrame = model.CFrame + Vector3.new(Position,0,0)
  369.     for _,part in pairs (model:GetChildren()) do
  370.         if part.ClassName == "Part" then
  371.             part.CFrame = part.CFrame + Vector3.new(Position,0,0)
  372.         end
  373.     end
  374. end
  375. function MoveSpawn(model, PLAYERPOS)
  376. model.CFrame = model.CFrame + PLAYERPOS + Vector3.new(300,-5,0)
  377.     for _,part in pairs (model:GetChildren()) do
  378.         if part.ClassName == "Part" then
  379.             part.CFrame = part.CFrame + PLAYERPOS + Vector3.new(300,-5,0)
  380.         end
  381.     end
  382. end
  383.         if game.Players:FindFirstChild(Victim) ~= nil then
  384.             game.Players[Victim].Character.HumanoidRootPart.Anchored = true
  385.             game.Players[Victim].Character.Humanoid.WalkSpeed = 0
  386.             game.Players[Victim].Character.Humanoid.JumpPower = 0
  387.             MoveSpawn(u1,game.Players[Victim].Character.HumanoidRootPart.Position)
  388.         end
  389.         for i=1,100 do
  390. MoveX(u1,-3)
  391. wait()
  392. end
  393. tractordown()
  394. game.Players[Victim].Character.Head.face.Texture = "rbxassetid://629925029"
  395. SCREAM = Instance.new("Sound")
  396. SCREAM.Parent = game.Players[Victim].Character.Head
  397. SCREAM.SoundId = "rbxassetid://138167455"
  398. SCREAM.Volume = 10
  399. SCREAM:Play()
  400. game.Players[Victim].Character.HumanoidRootPart.CFrame = u6.CFrame
  401. wait(0.1)
  402. game.Players[Victim].Character.HumanoidRootPart.CFrame = u7.CFrame
  403. wait(0.1)
  404. game.Players[Victim].Character.HumanoidRootPart.CFrame = u8.CFrame
  405. wait(0.1)
  406. game.Players[Victim].Character.HumanoidRootPart.CFrame = u9.CFrame
  407. wait(0.1)
  408. game.Players[Victim].Character.HumanoidRootPart.CFrame = u10.CFrame
  409. wait(0.1)
  410. game.Players[Victim].Character.HumanoidRootPart.CFrame = u11.CFrame
  411. wait(0.1)
  412. game.Players[Victim].Character.HumanoidRootPart.CFrame = u12.CFrame
  413. wait(0.1)
  414. game.Players[Victim].Character.HumanoidRootPart.CFrame = u13.CFrame
  415. wait(0.1)
  416. game.Players[Victim].Character.HumanoidRootPart.CFrame = u14.CFrame
  417. wait(0.1)
  418. game.Players[Victim].Character.HumanoidRootPart.CFrame = u15.CFrame
  419. wait(0.1)
  420. game.Players[Victim].Character.HumanoidRootPart.CFrame = u16.CFrame
  421. wait(0.1)
  422. game.Players[Victim].Character.HumanoidRootPart.CFrame = u17.CFrame
  423. wait(0.1)
  424. game.Players[Victim].Character.HumanoidRootPart.CFrame = u18.CFrame
  425. wait(0.1)
  426. game.Players[Victim].Character.HumanoidRootPart.CFrame = u19.CFrame
  427. wait(0.1)
  428. game.Players[Victim].Character.HumanoidRootPart.CFrame = u20.CFrame
  429. wait(0.1)
  430. game.Players[Victim].Character.HumanoidRootPart.CFrame = u21.CFrame
  431. wait(0.1)
  432. game.Players[Victim].Character.HumanoidRootPart.CFrame = u22.CFrame
  433. wait(0.1)
  434. game.Players[Victim].Character.HumanoidRootPart.CFrame = u23.CFrame
  435. tractorup()
  436. for i=1,50 do
  437. MoveX(u1,-3)
  438. if game.Players[Victim] ~= nil then
  439. game.Players[Victim].Character.HumanoidRootPart.CFrame = u23.CFrame
  440. end
  441. wait(.05)
  442. end
  443. wait(0.5)
  444. game.Players[Victim].Character.HumanoidRootPart.CFrame = u21.CFrame
  445. game.Players[Victim].Character.Humanoid.Health = 0
  446. game.Players[Victim].Character.HumanoidRootPart.Anchored = false
  447. for i=1,50 do
  448. MoveX(u1,-3)
  449. wait()
  450. end
  451. u1:Destroy()
  452. wait(2)
  453. music1:Stop()
  454. music1:Remove()
  455.         end  
  456.         end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement