Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- --A Remark Script
- local Player = owner
- script.Parent = Player.PlayerGui
- local Camera = workspace.CurrentCamera
- local Run = game["Run Service"]
- local MaxDistance = 500
- Player.Character = nil
- Camera.CameraType = "Fixed"
- local Block = Instance.new("Part",workspace.Terrain)
- Block.Anchored = true
- Block.CanCollide = false
- Block.Size = Vector3.new(1,1,1)
- Block.BackSurface = "SmoothNoOutlines"
- Block.BottomSurface = "SmoothNoOutlines"
- Block.FrontSurface = "SmoothNoOutlines"
- Block.LeftSurface = "SmoothNoOutlines"
- Block.RightSurface = "SmoothNoOutlines"
- Block.TopSurface = "SmoothNoOutlines"
- Block.BrickColor = BrickColor.Black()
- Block.Transparency = 0
- local BigBlock = Instance.new("Part",workspace.Terrain)
- BigBlock.Anchored = true
- BigBlock.CanCollide = false
- BigBlock.Size = Vector3.new(3,3,3)
- BigBlock.BackSurface = "SmoothNoOutlines"
- BigBlock.BottomSurface = "SmoothNoOutlines"
- BigBlock.FrontSurface = "SmoothNoOutlines"
- BigBlock.LeftSurface = "SmoothNoOutlines"
- BigBlock.RightSurface = "SmoothNoOutlines"
- BigBlock.TopSurface = "SmoothNoOutlines"
- BigBlock.BrickColor = BrickColor.White()
- BigBlock.Transparency = 0.5
- local MinSize = 20
- DestroyPart = function(Part)
- for i = 1,4 do
- if Part and Part.Size.X < MinSize and Part.Size.Z < MinSize then
- Part:Destroy()
- else
- local Clone = Part:Clone()
- Clone.Parent = workspace
- Clone.Size = Vector3.new(Part.Size.X/2,Part.Size.Y,Part.Size.Z/2)
- if i == 1 then
- Clone.CFrame = Part.CFrame * CFrame.new(Clone.Size.X/2,0,Clone.Size.Z/2)
- end
- if i == 2 then
- Clone.CFrame = Part.CFrame * CFrame.new(-Clone.Size.X/2,0,-Clone.Size.Z/2)
- end
- if i == 3 then
- Clone.CFrame = Part.CFrame * CFrame.new(-Clone.Size.X/2,0,Clone.Size.Z/2)
- end
- if i == 4 then
- Clone.CFrame = Part.CFrame * CFrame.new(Clone.Size.X/2,0,-Clone.Size.Z/2)
- end
- end
- end
- Part:Destroy()
- end
- Mouse.Button1Down:connect(function()
- local Model = Instance.new("Model",workspace.Terrain)
- local Block = Instance.new("Part",Model)
- Mouse.TargetFilter = Model
- local DistFromBlock = 5
- Block.Anchored = true
- Block.CanCollide = false
- local Distance = (Mouse.hit.p-BigBlock.CFrame.p).magnitude
- local OverDis = false
- local OverDisNum = 0
- if Distance > MaxDistance then
- OverDis = true OverDisNum = Distance - MaxDistance Distance = MaxDistance
- local EndPoint = CFrame.new(Mouse.hit.p,BigBlock.CFrame.p) * CFrame.new(0,0,-Distance/2+DistFromBlock-OverDisNum) * CFrame.Angles(0,math.rad(90),0)
- local Break = coroutine.resume(coroutine.create(function()
- for i = 1,10 do
- if Mouse.Target and Mouse.Target:IsA("Part") and Mouse.Target ~= Block and Mouse.Target ~= BigBlock then
- DestroyPart(Mouse.Target)
- end
- end
- end))
- Block.Size = Vector3.new(Distance-DistFromBlock,5,5)
- Block.BackSurface = "SmoothNoOutlines"
- Block.BottomSurface = "SmoothNoOutlines"
- Block.FrontSurface = "SmoothNoOutlines"
- Block.LeftSurface = "SmoothNoOutlines"
- Block.RightSurface = "SmoothNoOutlines"
- Block.TopSurface = "SmoothNoOutlines"
- Block.Shape = "Cylinder"
- Block.BrickColor = BrickColor.White()
- Block.Transparency = 0
- Block.CFrame = EndPoint
- local ShrinkIncrement = 5
- local Break = coroutine.resume(coroutine.create(function()
- for i = 1,30 do
- if Mouse.Target and Mouse.Target:IsA("Part") and Mouse.Target ~= Block and Mouse.Target ~= BigBlock then
- DestroyPart(Mouse.Target)
- end
- wait()
- end
- end))
- local Shrink = coroutine.resume(coroutine.create(function()
- for i = 1,Block.Size.Z*10, ShrinkIncrement do
- Distance = (Mouse.hit.p-BigBlock.CFrame.p).magnitude if Distance > MaxDistance then
- OverDisNum = Distance - MaxDistance Distance = MaxDistance print(OverDisNum)
- EndPoint = CFrame.new(Mouse.hit.p,BigBlock.CFrame.p) * CFrame.new(0,0,-Distance/2+DistFromBlock-OverDisNum) * CFrame.Angles(0,math.rad(90),0)
- else
- EndPoint = CFrame.new(Mouse.hit.p,BigBlock.CFrame.p) * CFrame.new(0,0,-Distance/2+DistFromBlock) * CFrame.Angles(0,math.rad(90),0)
- end
- Block.Size = Vector3.new(Distance-DistFromBlock,5,5)
- Block.CFrame = EndPoint
- if Mouse.Target and Mouse.Target:IsA("Part") and Mouse.Target ~= Block and Mouse.Target ~= BigBlock then
- DestroyPart(Mouse.Target)
- end
- wait()
- end
- Block:Destroy()
- end))
- else
- local EndPoint = CFrame.new(Mouse.hit.p,BigBlock.CFrame.p) * CFrame.new(0,0,-Distance/2+DistFromBlock) * CFrame.Angles(0,math.rad(90),0)
- local Break = coroutine.resume(coroutine.create(function()
- for i = 1,10 do if Mouse.Target and Mouse.Target:IsA("Part") and Mouse.Target ~= Block and Mouse.Target ~= BigBlock then
- DestroyPart(Mouse.Target)
- end
- end
- end))
- Block.Size = Vector3.new(Distance-DistFromBlock,5,5)
- Block.BackSurface = "SmoothNoOutlines"
- Block.BottomSurface = "SmoothNoOutlines"
- Block.FrontSurface = "SmoothNoOutlines"
- Block.LeftSurface = "SmoothNoOutlines"
- Block.RightSurface = "SmoothNoOutlines"
- Block.TopSurface = "SmoothNoOutlines"
- Block.Shape = "Cylinder"
- Block.BrickColor = BrickColor.White()
- Block.Transparency = 0
- Block.CFrame = EndPoint
- local ShrinkIncrement = 5
- local Break = coroutine.resume(coroutine.create(function()
- for i = 1,30 do
- if Mouse.Target and Mouse.Target:IsA("Part") and Mouse.Target ~= Block and Mouse.Target ~= BigBlock then
- DestroyPart(Mouse.Target)
- end
- wait()
- end
- end))
- local Shrink = coroutine.resume(coroutine.create(function()
- for i = 1,Block.Size.Z*10, ShrinkIncrement do
- Distance = (Mouse.hit.p-BigBlock.CFrame.p).magnitude
- if Distance > MaxDistance then OverDisNum = Distance - MaxDistance Distance = MaxDistance
- print(OverDisNum)
- EndPoint = CFrame.new(Mouse.hit.p,BigBlock.CFrame.p) * CFrame.new(0,0,-Distance/2+DistFromBlock-OverDisNum) * CFrame.Angles(0,math.rad(90),0)
- else
- EndPoint = CFrame.new(Mouse.hit.p,BigBlock.CFrame.p) * CFrame.new(0,0,-Distance/2+DistFromBlock) * CFrame.Angles(0,math.rad(90),0)
- end
- Block.Size = Vector3.new(Distance-DistFromBlock,5,5)
- Block.CFrame = EndPoint
- if Mouse.Target and Mouse.Target:IsA("Part") and Mouse.Target ~= Block and Mouse.Target ~= BigBlock then
- DestroyPart(Mouse.Target)
- end
- wait()
- end
- Block:Destroy()
- end))
- end
- end)
- Player.Chatted:connect(function(msg)
- local Chat = coroutine.resume(coroutine.create(function()
- local Bill = Instance.new("BillboardGui",BigBlock)
- Bill.StudsOffset = Vector3.new(0,6,0)
- Bill.Size = UDim2.new(10,0,3,0)
- local Frame = Instance.new("ScrollingFrame",Bill)
- Frame.Size = UDim2.new(1,0,1,-1)
- Frame.Transparency = 1
- Frame.ScrollBarThickness = 0
- Frame.CanvasSize = UDim2.new(0,0,0,0)
- local Text = Instance.new("TextLabel",Frame)
- Text.Position = UDim2.new(0.5,0,1,-1)
- Text.Size = UDim2.new(0,0,1,0)
- Text.Text = ""
- Text.BorderColor = BigBlock.BrickColor
- Text.BackgroundTransparency = 0
- Text.BorderSizePixel = 0
- Text.Font = "SourceSansBold"
- Text.FontSize = "Size36"
- Text.TextScaled = true
- Text.TextColor = BigBlock.BrickColor
- local top = 255
- local Bubble = true
- local ColorChanger = coroutine.resume(coroutine.create(function()
- while Bubble do
- for i = 1,top,10 do
- Text.BackgroundColor3 = Color3.new(top/top,i/top,0/top)
- wait()
- end
- for i = 1,top,10 do
- Text.BackgroundColor3 = Color3.new(top/top,top/top,i/top)
- wait()
- end
- for i = top,1,-10 do
- Text.BackgroundColor3 = Color3.new(i/top,top/top,top/top)
- wait()
- end
- for i = top,1,-10 do
- Text.BackgroundColor3 = Color3.new(0/top,i/top,top/top)
- wait()
- end
- for i = top,1,-10 do
- Text.BackgroundColor3 = Color3.new(-i/top,0/top,i/top)
- wait()
- end
- end
- end))
- Text:TweenSize(UDim2.new(1, 0, 1, 0),"Out", "Quad", 0.5)
- Text:TweenPosition(UDim2.new(0, 0, 1, -1),"Out", "Quad", 0.5)
- wait(0.5)
- Text:TweenPosition(UDim2.new(0, 0, 0, 0),"Out", "Quad", 0.5)
- wait(0.5)
- for i = 1,#msg do
- Text.Text = msg:sub(1,i)
- wait(0.1)
- end
- wait(3)
- Text:TweenPosition(UDim2.new(0, 0, 1, -1),"Out", "Quad", 0.5)
- wait(0.5)
- Text:TweenPosition(UDim2.new(0.5, 0, 1, -1),"Out", "Quad", 0.5)
- Text:TweenSize(UDim2.new(0, 0, 1, 0),"Out", "Quad", 0.5)
- Bubble = false
- end))
- end)
- local PLight = Instance.new("PointLight",BigBlock)
- PLight.Color = BigBlock.BrickColor.Color
- PLight.Brightness = 25 PLight.Range = 10
- local Bill = Instance.new("BillboardGui",BigBlock)
- Bill.StudsOffset = Vector3.new(0,3,0)
- Bill.Size = UDim2.new(5,0,2,0)
- Text = Instance.new("TextLabel",Bill)
- Text.Size = UDim2.new(1,0,1,0)
- Text.BackgroundTransparency = 1
- Text.Text = Player.Name
- Text.Font = "SourceSansBold"
- Text.FontSize = "Size96"
- Text.TextScaled = true
- Text.TextColor = BigBlock.BrickColor
- local Angle = 0
- Run.RenderStepped:connect(function()
- Angle = Angle + 0.1 BigBlock.Rotation = Vector3.new(0,0,0)
- BigBlock.CFrame = CFrame.new(Camera.Focus.X,Camera.Focus.Y,Camera.Focus.Z) * CFrame.Angles(0,Angle,0)
- Block.CFrame = BigBlock.CFrame * CFrame.Angles(Angle,0,Angle)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement