SHOW:
|
|
- or go back to the newest paste.
| 1 | -- This script has been converted to FE by iPxter | |
| 2 | ||
| 3 | - | local p = game.Players.LocalPlayer |
| 3 | + | |
| 4 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 5 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
| 6 | do | |
| 7 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
| |
| 8 | script.Parent = Player.Character | |
| 9 | ||
| 10 | --RemoteEvent for communicating | |
| 11 | local Event = Instance.new("RemoteEvent")
| |
| 12 | Event.Name = "UserInput_Event" | |
| 13 | ||
| 14 | --Fake event to make stuff like Mouse.KeyDown work | |
| 15 | local function fakeEvent() | |
| 16 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
| |
| 17 | t.connect = t.Connect | |
| 18 | return t | |
| 19 | end | |
| 20 | ||
| 21 | --Creating fake input objects with fake variables | |
| 22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
| |
| 23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 26 | end} | |
| 27 | --Merged 2 functions into one by checking amount of arguments | |
| 28 | CAS.UnbindAction = CAS.BindAction | |
| 29 | ||
| 30 | --This function will trigger the events that have been :Connect()'ed | |
| 31 | local function te(self,ev,...) | |
| 32 | local t = m[ev] | |
| 33 | if t and t._fakeEvent and t.Function then | |
| 34 | t.Function(...) | |
| 35 | end | |
| 36 | end | |
| 37 | m.TrigEvent = te | |
| 38 | UIS.TrigEvent = te | |
| 39 | ||
| 40 | Event.OnServerEvent:Connect(function(plr,io) | |
| 41 | if plr~=Player then return end | |
| 42 | if io.isMouse then | |
| 43 | m.Target = io.Target | |
| 44 | m.Hit = io.Hit | |
| 45 | else | |
| 46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 49 | end | |
| 50 | for _,t in pairs(CAS.Actions) do | |
| 51 | for _,k in pairs(t.Keys) do | |
| 52 | if k==io.KeyCode then | |
| 53 | t.Function(t.Name,io.UserInputState,io) | |
| 54 | end | |
| 55 | end | |
| 56 | end | |
| 57 | - | if p.Parent.Name ~= game.Players.LocalPlayer.Name then |
| 57 | + | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) |
| 58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 59 | end | |
| 60 | end) | |
| 61 | Event.Parent = NLS([==[ | |
| 62 | local Player = game:GetService("Players").LocalPlayer
| |
| 63 | local Event = script:WaitForChild("UserInput_Event")
| |
| 64 | ||
| 65 | local UIS = game:GetService("UserInputService")
| |
| 66 | local input = function(io,a) | |
| 67 | if a then return end | |
| 68 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 69 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
| |
| 70 | end | |
| 71 | UIS.InputBegan:Connect(input) | |
| 72 | UIS.InputEnded:Connect(input) | |
| 73 | ||
| 74 | local Mouse = Player:GetMouse() | |
| 75 | local h,t | |
| 76 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 77 | --If player is not moving their mouse, client won't fire events | |
| 78 | while wait(1/30) do | |
| 79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 80 | h,t=Mouse.Hit,Mouse.Target | |
| 81 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 82 | end | |
| 83 | end]==],Player.Character) | |
| 84 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
| 85 | end | |
| 86 | ||
| 87 | --{{Made by Strazos}}--
| |
| 88 | ||
| 89 | local p = game.Players.hsdfsfsdfds | |
| 90 | local char = p.Character | |
| 91 | local larm = char["Left Arm"] | |
| 92 | local rarm = char["Right Arm"] | |
| 93 | local lleg = char["Left Leg"] | |
| 94 | local rleg = char["Right Leg"] | |
| 95 | local hed = char.Head | |
| 96 | local torso = char.Torso | |
| 97 | local hum = char.Humanoid | |
| 98 | local weld = Instance.new("Weld",torso)
| |
| 99 | weld.Part0 = torso | |
| 100 | ||
| 101 | larm.Transparency = 1 | |
| 102 | rarm.Transparency = 1 | |
| 103 | lleg.Transparency = 1 | |
| 104 | rleg.Transparency = 1 | |
| 105 | hed.Transparency = 1 | |
| 106 | torso.Transparency = 1 | |
| 107 | ||
| 108 | ||
| 109 | local train = Instance.new("Part",torso)
| |
| 110 | train.Anchored = true | |
| 111 | train.CanCollide = false | |
| 112 | train.Size = Vector3.new(1,1,1) | |
| 113 | train.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0) | |
| 114 | weld.Part1 = train | |
| 115 | - | local plr = game.Players.LocalPlayer |
| 115 | + | |
| 116 | train.Anchored = false | |
| 117 | - | local maus = plr:GetMouse() |
| 117 | + | |
| 118 | TrainMesh.MeshType = Enum.MeshType.FileMesh | |
| 119 | TrainMesh.Scale = Vector3.new(3,3,3) | |
| 120 | TrainMesh.MeshId = "rbxassetid://471480829" | |
| 121 | TrainMesh.TextureId = "rbxassetid://471480833" | |
| 122 | ||
| 123 | ||
| 124 | hum.WalkSpeed = 120; | |
| 125 | ||
| 126 | ||
| 127 | for i,v in pairs(char:GetChildren()) do | |
| 128 | if v:IsA("Part") then
| |
| 129 | v.Transparency = 1; | |
| 130 | elseif v:IsA("Hat") then
| |
| 131 | v:Destroy() | |
| 132 | elseif v:IsA("Model") then
| |
| 133 | v:Destroy() | |
| 134 | end | |
| 135 | end | |
| 136 | ||
| 137 | ||
| 138 | local function SFX(id) local s=Instance.new("Sound",torso); s.SoundId = "rbxassetid://"..id; s.Volume = 64364643643; return s; end
| |
| 139 | train.Touched:connect(function(p) | |
| 140 | if p.Parent then | |
| 141 | if p.Parent:IsA("Model") then
| |
| 142 | if game.Players:FindFirstChild(p.Parent.Name) then | |
| 143 | if p.Parent.Name ~= game.Players.hsdfsfsdfds.Name then | |
| 144 | game.Players:FindFirstChild(p.Parent.Name).Character:BreakJoints() | |
| 145 | local Whistle = SFX(154365429) | |
| 146 | Whistle:Play() | |
| 147 | end | |
| 148 | end | |
| 149 | end | |
| 150 | end | |
| 151 | end) | |
| 152 | ||
| 153 | local Music = SFX(468775372) | |
| 154 | Music.Looped = true; | |
| 155 | wait(1) | |
| 156 | Music:Play(); | |
| 157 | ||
| 158 | ||
| 159 | local particleemitter = Instance.new("ParticleEmitter", torso)
| |
| 160 | particleemitter.Texture = "http://www.roblox.com/asset/?id=243088609" | |
| 161 | particleemitter.Lifetime = NumberRange.new(4) | |
| 162 | particleemitter.Speed = NumberRange.new(10) | |
| 163 | particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(1, 2)})
| |
| 164 | particleemitter.RotSpeed = NumberRange.new(-55, 55) | |
| 165 | particleemitter.Rate = 80 | |
| 166 | particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.7), NumberSequenceKeypoint.new(0.9, 1), NumberSequenceKeypoint.new(1, 1)})
| |
| 167 | particleemitter.LightEmission = 0 | |
| 168 | particleemitter.EmissionDirection = "Back" | |
| 169 | particleemitter.Color = ColorSequence.new(Color3.new(255,255,255), Color3.new(255,255,255)) --Color here | |
| 170 | ------------------------------------------------- | |
| 171 | --rgb function by Strazos-- | |
| 172 | ||
| 173 | function HSLtoRGB(hue, sat, light) | |
| 174 | local c = light > .5 and (2 - 2 * light) * sat or (2 * light) * sat | |
| 175 | local h2 = hue / 60 | |
| 176 | local x = c * (1 - math.abs((h2 % 2) - 1)) | |
| 177 | local rgbvals = {{c, x, 0}, {x, c, 0}, {0, c, x}, {0, x, c}, {x, 0, c}, {c, 0, x}}
| |
| 178 | local rgb = rgbvals[math.floor(h2) + 1] | |
| 179 | for i = 1, 3 do rgb[i] = rgb[i] + (light - .5 * c) end | |
| 180 | return Color3.new(rgb[1], rgb[2], rgb[3]) | |
| 181 | end | |
| 182 | ||
| 183 | local torso = script.Parent | |
| 184 | ||
| 185 | spawn(function() | |
| 186 | while wait() do | |
| 187 | for i = 1,150 do | |
| 188 | wait() | |
| 189 | train.Mesh.VertexColor = Vector3.new(HSLtoRGB(i*2,1,0.5).r,HSLtoRGB(i*2,1,0.5).g,HSLtoRGB(i*2,1,0.5).b) | |
| 190 | end | |
| 191 | local reversei = 150 | |
| 192 | for i = 1,150 do | |
| 193 | wait() | |
| 194 | train.Mesh.VertexColor = Vector3.new(HSLtoRGB(reversei*2,1,0.5).r,HSLtoRGB(reversei*2,1,0.5).g,HSLtoRGB(reversei*2,1,0.5).b) | |
| 195 | reversei = reversei-1 | |
| 196 | end | |
| 197 | end | |
| 198 | end) | |
| 199 | ||
| 200 | --------------------------------------------------- | |
| 201 | local plr = game.Players.hsdfsfsdfds | |
| 202 | local chr = plr.Character | |
| 203 | local PGui=plr.PlayerGui | |
| 204 | local lleg = chr["Left Leg"] | |
| 205 | local rleg = chr["Right Leg"] | |
| 206 | local larm = chr["Left Arm"] | |
| 207 | local rarm = chr["Right Arm"] | |
| 208 | local hed = chr.Head | |
| 209 | local rutprt = chr.HumanoidRootPart | |
| 210 | local torso = chr.Torso | |
| 211 | local pseudohead=hed:Clone() | |
| 212 | for i,x in pairs(pseudohead:GetChildren()) do if not x.ClassName:find('Mesh') then x:Destroy() end end
| |
| 213 | pseudohead.Name='PseudoHead' | |
| 214 | pseudohead.Parent=chr.Head | |
| 215 | local pseudoweld=Instance.new('Weld',torso)
| |
| 216 | pseudoweld.Part0=hed | |
| 217 | pseudoweld.Name='PseudoHeadWeld' | |
| 218 | pseudoweld.Part1=pseudohead | |
| 219 | hed.Transparency=1 | |
| 220 | for i,x in pairs(chr:GetChildren()) do | |
| 221 | if x:IsA'HHat' then x:destroy'' end end | |
| 222 | for i,x in pairs(chr:GetChildren()) do | |
| 223 | for a,v in pairs(x:GetChildren()) do | |
| 224 | if v:IsA'CharacterMesh' then v:destroy'' | |
| 225 | end | |
| 226 | end | |
| 227 | end |