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
- -- Farewell Infortality.
- -- Version: 2.82
- -- Instances:
- local ScreenGui = Instance.new("ScreenGui")
- local ooffame = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local Frame = Instance.new("Frame")
- local TextBox = Instance.new("TextBox")
- local TextButton = Instance.new("TextButton")
- --Properties:
- ScreenGui.Parent = owner:WaitForChild("PlayerGui")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- ooffame.Name = "ooffame"
- ooffame.Parent = ScreenGui
- ooffame.BackgroundColor3 = Color3.new(1, 1, 1)
- ooffame.BorderSizePixel = 0
- ooffame.Position = UDim2.new(0.0499058403, 0, 0.573705196, 0)
- ooffame.Size = UDim2.new(0, 380, 0, 187)
- TextLabel.Parent = ooffame
- TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel.BorderSizePixel = 0
- TextLabel.Size = UDim2.new(0, 380, 0, 46)
- TextLabel.Font = Enum.Font.SourceSans
- TextLabel.Text = "Add Bricks To Player."
- TextLabel.TextColor3 = Color3.new(0, 0, 0)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14
- TextLabel.TextWrapped = true
- Frame.Parent = ooffame
- Frame.BackgroundColor3 = Color3.new(0, 0, 0.258824)
- Frame.Position = UDim2.new(0, 0, 0.245989308, 0)
- Frame.Size = UDim2.new(0, 380, 0, 6)
- TextBox.Parent = ooffame
- TextBox.BackgroundColor3 = Color3.new(0.666667, 0, 0)
- TextBox.Position = UDim2.new(0.236842111, 0, 0.363636374, 0)
- TextBox.Size = UDim2.new(0, 200, 0, 33)
- TextBox.Font = Enum.Font.Garamond
- TextBox.Text = "Username"
- TextBox.TextColor3 = Color3.new(1, 1, 1)
- TextBox.TextScaled = true
- TextBox.TextSize = 14
- TextBox.TextWrapped = true
- TextButton.Parent = ooffame
- TextButton.BackgroundColor3 = Color3.new(0, 0.333333, 0)
- TextButton.Position = UDim2.new(0, 90, 0, 130)
- TextButton.Size = UDim2.new(0, 200, 0, 31)
- TextButton.Font = Enum.Font.Gotham
- TextButton.Text = "LET IT GROW"
- TextButton.TextColor3 = Color3.new(1, 1, 1)
- TextButton.TextScaled = true
- TextButton.TextSize = 14
- TextButton.TextWrapped = true
- -- Scripts:
- TextButton.MouseButton1Down:Connect(function()
- local VIC = TextBox.Text
- if game.Players:FindFirstChild(VIC) then
- local LocalPlayer = game:GetService("Players")[VIC]
- local Character = LocalPlayer.Character
- local Position = Vector3.new(0,100,0)
- local Ball1 = Instance.new("Part", Character)
- Ball1.Size = Vector3.new(1.3,1.3,1.3)
- Ball1.Shape = "Ball"
- Ball1.BrickColor = BrickColor.new("Pastel brown")
- Ball1.TopSurface = "Smooth"
- Ball1.BottomSurface = "Smooth"
- Ball1.FormFactor = 'Custom'
- Ball1.Position = Position + Vector3.new(0,10,0)
- local Ball1Weld = Instance.new("Weld", Character.Torso)
- Ball1Weld.Part0 = Character.Torso
- Ball1Weld.Part1 = Ball1
- Ball1Weld.C1 = CFrame.new(.5,-.3,.4)
- local Ball2 = Instance.new("Part", Character)
- Ball2.Size = Vector3.new(1.3,1.3,1.3)
- Ball2.Shape = "Ball"
- Ball2.BrickColor = BrickColor.new("Pastel brown")
- Ball2.TopSurface = "Smooth"
- Ball2.BottomSurface = "Smooth"
- Ball2.FormFactor = 'Custom'
- Ball2.Position = Position + Vector3.new(0,10,0)
- local Ball2Weld = Instance.new("Weld", Character.Torso)
- Ball2Weld.Part0 = Character.Torso
- Ball2Weld.Part1 = Ball2
- Ball2Weld.C1 = CFrame.new(-.5,-.3,.4)
- local Ball3 = Instance.new("Part", Character)
- Ball3.Size = Vector3.new(.4,.4,.4)
- Ball3.Shape = "Ball"
- Ball3.BrickColor = BrickColor.new("Brown")
- Ball3.TopSurface = "Smooth"
- Ball3.BottomSurface = "Smooth"
- Ball3.FormFactor = 'Custom'
- Ball3.Position = Position + Vector3.new(0,10,0)
- local Ball3Weld = Instance.new("Weld", Character.Torso)
- Ball3Weld.Part0 = Character.Torso
- Ball3Weld.Part1 = Ball3
- Ball3Weld.C1 = CFrame.new(-.5,-.3,.9)
- local Ball4 = Instance.new("Part", Character)
- Ball4.Size = Vector3.new(.4,.4,.4)
- Ball4.Shape = "Ball"
- Ball4.BrickColor = BrickColor.new("Brown")
- Ball4.TopSurface = "Smooth"
- Ball4.BottomSurface = "Smooth"
- Ball4.FormFactor = 'Custom'
- Ball4.Position = Position + Vector3.new(0,10,0)
- local Ball4Weld = Instance.new("Weld", Character.Torso)
- Ball4Weld.Part0 = Character.Torso
- Ball4Weld.Part1 = Ball4
- Ball4Weld.C1 = CFrame.new(.5,-.3,.9)
- local Ball5 = Instance.new("Part", Character)
- Ball5.Size = Vector3.new(1.2,1.2,1.2)
- Ball5.Shape = "Ball"
- Ball5.BrickColor = BrickColor.new("Pastel brown")
- Ball5.TopSurface = "Smooth"
- Ball5.BottomSurface = "Smooth"
- Ball5.FormFactor = 'Custom'
- Ball5.Position = Position + Vector3.new(0,10,0)
- local Ball5Weld = Instance.new("Weld", Character.Torso)
- Ball5Weld.Part0 = Character.Torso
- Ball5Weld.Part1 = Ball5
- Ball5Weld.C1 = CFrame.new(-.5,.9,-.4)
- local Ball6 = Instance.new("Part", Character)
- Ball6.Size = Vector3.new(1.2,1.2,1.2)
- Ball6.Shape = "Ball"
- Ball6.BrickColor = BrickColor.new("Pastel brown")
- Ball6.TopSurface = "Smooth"
- Ball6.BottomSurface = "Smooth"
- Ball6.FormFactor = 'Custom'
- Ball6.Position = Position + Vector3.new(0,10,0)
- local Ball6Weld = Instance.new("Weld", Character.Torso)
- Ball6Weld.Part0 = Character.Torso
- Ball6Weld.Part1 = Ball6
- Ball6Weld.C1 = CFrame.new(.5,.9,-.4)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement