Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game.Players.LocalPlayer
- local Mouse = Player:GetMouse()
- repeat wait() until Player.Character
- local MyCharacter = Player.Character
- local Torso = MyCharacter.Torso
- local Model = Instance.new('Model')
- Model.Name = 'UFO_' .. Player.Name
- local Base = Instance.new('Part', Model)
- Base.Name = 'UFOBase'
- Base.BrickColor = BrickColor.Black()
- Base.Anchored = true
- Base.Size = Vector3.new(8, 1, 8)
- Base.FormFactor = Enum.FormFactor.Custom
- local Cylinder = Instance.new('CylinderMesh', Base)
- Cylinder.Name = 'CylinderShape'
- local Beam = Instance.new('Part', Model)
- Beam.Transparency = 0.5
- Beam.BrickColor = BrickColor.Yellow()
- Beam.Parent = Model
- Beam.Size = Vector3.new(8, 500, 8)
- Beam.FormFactor = Enum.FormFactor.Custom
- Beam.CanCollide = false
- Beam.Anchored = true
- local Cylinder2 = Instance.new('CylinderMesh', Beam)
- Cylinder2.Name = 'CylinderShape'
- Model.PrimaryPart = Base
- Model.Parent = MyCharacter
- local Mode = 'Teleport'
- local RunService = game:GetService('RunService')
- local IgnoreY = true
- local SetY = 0
- local Enabled = true
- local Debounce = false
- local Expire = 20
- local function rotate(UFO, Center)
- UFO:WaitForChild('Base')
- UFO:WaitForChild('Beam')
- for Value = 1, (Expire * 30) do
- wait()
- if UFO then
- local Radius = Center.Size.X * 1.2
- UFO.Beam.Transparency = Beam.Transparency
- UFO.Beam.BrickColor = Beam.BrickColor
- UFO.Beam.CFrame = UFO.Base.CFrame * CFrame.new(0, -UFO.Beam.Size.Y / 2 - 0.5, 0)
- UFO.Base.Material = Base.Material
- UFO.Base.BrickColor = Base.BrickColor
- UFO:SetPrimaryPartCFrame(Center.CFrame * CFrame.new(Radius * math.sin(math.rad(Value)), 0, Radius * math.cos(math.rad(Value))))
- end
- end
- UFO:Destroy()
- end
- local function onChatted(message)
- if message:sub(1, 5):lower() == '/spd ' then
- local speed = message:sub(6)
- if tonumber(speed) then
- Base.Size = Vector3.new(speed / 2, 1, speed / 2)
- MyCharacter.Humanoid.WalkSpeed = speed
- end
- elseif message:sub(1, 4):lower() == '/vpr' then
- Mode = 'Vaporize'
- Beam.BrickColor = BrickColor.Red()
- elseif message:sub(1, 4):lower() == '/frz' then
- Mode = 'Freeze'
- Beam.BrickColor = BrickColor.Blue()
- elseif message:sub(1, 4):lower() == '/thw' then
- Mode = 'Thaw'
- Beam.BrickColor = BrickColor.Green()
- elseif message:sub(1, 3):lower() == '/tp' then
- Mode = 'Teleport'
- Beam.BrickColor = BrickColor.Yellow()
- elseif message:sub(1, 3):lower() == '/jl' then
- Mode = 'Jail'
- Beam.BrickColor = BrickColor.Black()
- elseif message:sub(1, 2):lower() == '/e' then
- Enabled = not Enabled
- Beam.Transparency = Enabled and 0.5 or 1
- elseif message:sub(1, 5):lower() == '/clr ' then
- local color = message:sub(6)
- Base.BrickColor = BrickColor.new(color)
- elseif message:sub(1, 6):lower() == '/camo ' then
- local BasePlate = workspace:FindFirstChild(message:sub(7))
- if BasePlate and BasePlate:IsA('BasePart') then
- Base.Transparency = BasePlate.Transparency
- Base.Material = BasePlate.Material
- Base.BrickColor = BasePlate.BrickColor
- end
- elseif message:sub(1, 7):lower() == '/uncamo' then
- Base.Transparency = 0
- Base.Material = Enum.Material.Plastic
- Base.BrickColor = BrickColor.Black()
- elseif message:sub(1, 8):lower() == '/setexp ' then
- local number = message:sub(9)
- if tonumber(number) then
- Expire = tonumber(number)
- end
- elseif message:sub(1, 6):lower() == '/drop ' then
- local number = message:sub(7)
- if tonumber(number) then
- MyCharacter:MoveTo(MyCharacter:GetModelCFrame().p - tonumber(number))
- end
- elseif message:sub(1, 4):lower() == '/drn' then
- local Storage = Instance.new('Model')
- Storage.Name = 'UFOSpawn'
- local Clone = Base:Clone()
- Clone.Parent = Storage
- Clone.Name = 'Base'
- local CloneBeam = Instance.new('Part', Storage)
- CloneBeam.Name = 'Beam'
- CloneBeam.Transparency = Beam.Transparency
- CloneBeam.BrickColor = Beam.BrickColor
- CloneBeam.Size = Beam.Size
- CloneBeam.FormFactor = Enum.FormFactor.Custom
- CloneBeam.CanCollide = Beam.CanCollide
- CloneBeam.Anchored = Beam.Anchored
- Instance.new('CylinderMesh').Parent = CloneBeam
- Storage.PrimaryPart = Clone
- Storage.Parent = Model
- wait()
- CloneBeam.Touched:connect(beamTouched)
- spawn(function()
- rotate(Storage, Base)
- end)
- elseif message:sub(1, 7) == '/clrdrn' then
- for Index, Child in next, Model:GetChildren() do
- if Child:IsA('Model') and Child.Name == 'UFOSpawn' then
- Child:Destroy()
- end
- end
- end
- end
- function beamTouched(hit)
- if not Enabled then return end
- if Debounce then return end Debounce = true
- if hit:IsDescendantOf(MyCharacter) then return end
- local Character = hit and hit.Parent
- if Character:FindFirstChild('Humanoid') and Character:FindFirstChild('Torso') then
- if Mode == 'Teleport' then
- Character.Torso.CFrame = Torso.CFrame * CFrame.new(0, 0, 1.5)
- elseif Mode == 'Vaporize' then
- for Index, Instance in next, Character:GetChildren() do
- if Instance:IsA('BasePart') then
- spawn(function()
- Instance.BrickColor = BrickColor.Black()
- local Start = Instance.Transparency
- for a = 0, 1, 0.1 do
- Instance.Transparency = a * (1 - Start) + Start
- wait()
- end
- Instance:Destroy()
- end)
- end
- end
- elseif Mode == 'Freeze' then
- for Index, Instance in next, Character:GetChildren() do
- if Instance:IsA('BasePart') and Instance.name ~= 'HumanoidRootPart' then
- Instance.Anchored = true
- Instance.BrickColor = BrickColor.Blue()
- Instance.Reflectance = 0.3
- Instance.Transparency = 0.4
- end
- end
- elseif Mode == 'Thaw' then
- local Color = BrickColor.Yellow()
- for Index, Instance in next, Character:GetChildren() do
- if Instance:IsA('BasePart') and Instance.Anchored and Instance.Reflectance == 0.3 then
- if Character:FindFirstChild('Body Colors') then
- Color = Character['Body Colors'][Instance.Name] or BrickColor.Yellow()
- end
- Instance.Anchored = false
- Instance.BrickColor = Color
- Instance.Reflectance = 0
- Instance.Transparency = 0
- end
- end
- elseif Mode == 'Jail' then
- if not Character:FindFirstChild('Cell') then
- local Cell = Instance.new('Model')
- Cell.Name = 'Cell'
- local Center = Character.Torso.Position
- local Top = Instance.new('Part', Cell)
- Top.Size = Vector3.new(12, 1, 12)
- Top.FormFactor = Enum.FormFactor.Custom
- Top.BrickColor = BrickColor.Black()
- Top.Anchored = true
- Top.CFrame = CFrame.new(Center) * CFrame.new(0, 5, 0)
- local Mesh = Instance.new('CylinderMesh')
- Mesh.Parent = Top
- local Bottom = Top:Clone()
- Bottom.Parent = Cell
- Bottom.CFrame = CFrame.new(Center) * CFrame.new(0, -3.5, 0)
- for Value = 1, 360 do
- local Angle = math.rad(Value)
- if math.fmod(Value, 24) == 0 then
- local part = Instance.new('Part')
- part.FormFactor = Enum.FormFactor.Custom
- part.BrickColor = BrickColor.Black()
- part.Anchored = true
- part.Size = Vector3.new(1, 8, 1)
- Instance.new('CylinderMesh', part).Scale = Vector3.new(0.9, 1, 0.9)
- part.CFrame = CFrame.new(Center) * CFrame.new(5 * math.sin(Angle), 0.5, 5 * math.cos(Angle))
- part.Parent = Cell
- end
- end
- Cell.Parent = Character
- else
- Character.Cell:Destroy()
- end
- end
- end
- wait(0.5)
- Debounce = false
- end
- local function renderStepped()
- local Position = Torso.Position
- local Size = Torso.Size
- local Humanoid = MyCharacter.Humanoid
- Base.Size = Vector3.new(Humanoid.WalkSpeed / 2, 1, Humanoid.WalkSpeed / 2)
- Base.CFrame = CFrame.new(Vector3.new(Position.X, IgnoreY and SetY or Position.Y - 3, Position.Z)) * CFrame.new(0, -Size.Y / 2, 0)
- if not IgnoreY then
- SetY = Base.Position.Y
- end
- Beam.CFrame = Base.CFrame * CFrame.new(0, -Beam.Size.Y / 2 - 0.5, 0)
- end
- Mouse.KeyDown:connect(function(Key)
- if Key == 'n' then
- RunService:UnbindFromRenderStep('UFORun')
- Base.CFrame = Base.CFrame * CFrame.new(0, -2, 0)
- SetY = Base.Position.Y
- RunService:BindToRenderStep('UFORun', 1, renderStepped)
- end
- end)
- MyCharacter.Humanoid.Changed:connect(function()
- if MyCharacter.Humanoid.Jump then
- IgnoreY = false
- else
- IgnoreY = true
- end
- end)
- wait(1)
- Beam.Touched:connect(beamTouched)
- Player.Chatted:connect(onChatted)
- RunService:BindToRenderStep('UFORun', 1, renderStepped)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement