SHOW:
|
|
- or go back to the newest paste.
1 | - | --MADE BY OneLegend (NOT THE SCRIPT) LOCAL SCRIPT: Go to line 5 and put your name where it says "YOUR NAME HERE" |
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,Mouse,mouse,UserInputService,ContextActionService = owner | |
4 | local RealPlayer = Player | |
5 | - | me = game.Players.peyquinn |
5 | + | do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end --MADE BY OneLegend (NOT THE SCRIPT) LOCAL SCRIPT: Go to line 5 and put your name where it says "YOUR NAME HERE" |
6 | ||
7 | ||
8 | Rainbow = {"Bright red", "Neon orange", "Bright yellow", "Lime green", "Deep blue", "Bright violet"} | |
9 | me = game.Players.timetodie23232223 | |
10 | function Part(P, Anch, Coll, Tran, Ref, Col, Size, Name) | |
11 | local p = Instance.new("Part") | |
12 | p.TopSurface = 0 | |
13 | p.BottomSurface = 0 | |
14 | p.Transparency = Tran | |
15 | p.Reflectance = Ref | |
16 | p.CanCollide = Coll | |
17 | p.Anchored = Anch | |
18 | p.BrickColor = BrickColor.new(Col) | |
19 | p.formFactor = "Custom" | |
20 | p.Size = Size | |
21 | if Name then p.Name = Name end | |
22 | p.Parent = P | |
23 | p.Locked = true | |
24 | p:BreakJoints() | |
25 | return p | |
26 | end | |
27 | V3 = Vector3.new | |
28 | CN = CFrame.new | |
29 | CA = CFrame.Angles | |
30 | MR = math.rad | |
31 | MRA = math.random | |
32 | function Weld(P0, P1, CF1, CF2, Name) | |
33 | local w = Instance.new("Motor6D") | |
34 | w.Part0 = P0 | |
35 | w.Part1 = P1 | |
36 | w.C0 = CF1 | |
37 | w.C1 = CF2 | |
38 | if Name then w.Name = Name end | |
39 | w.Parent = P0 | |
40 | return w | |
41 | end | |
42 | function MakeNyan(Player, S) | |
43 | local Naim = "Nyan "..Player.Name:sub(1,5) | |
44 | if S >= 5 then Naim = "Giant Nyan "..Player.Name:sub(1,5) end | |
45 | local Model = Instance.new("Model") | |
46 | Model.Name = Naim | |
47 | local Torso = Part(Model, false, false, 0, 0, "Brick yellow", V3(0.5*S, 1.5*S, 2*S), "Torso") | |
48 | local Head = Part(Model, false, false, 0, 0, "Dark grey", V3(0.6*S, 0.8*S, 1.2*S), "Head") | |
49 | Instance.new("BlockMesh",Head) | |
50 | local Neck = Weld(Torso, Head, CN(0, -0.35*S, -0.9*S), CN(), "Neck") | |
51 | local Tart = Part(Model, false, false, 0, 0, "Pink", V3(0.5*S+0.05, 1.2*S, 1.7*S), "Torso") | |
52 | Instance.new("BlockMesh",Tart) | |
53 | Weld(Torso, Tart, CN(), CN()) | |
54 | local RFL = Part(Model, false, false, 0, 0, "Dark grey", V3(0.4*S, 0.6*S, 0.4*S), "Right Arm") | |
55 | Instance.new("SpecialMesh",RFL).MeshType = "Sphere" | |
56 | local LFL = Part(Model, false, false, 0, 0, "Dark grey", V3(0.4*S, 0.6*S, 0.4*S), "Left Arm") | |
57 | Instance.new("SpecialMesh",LFL).MeshType = "Sphere" | |
58 | local RBL = Part(Model, false, false, 0, 0, "Dark grey", V3(0.4*S, 0.6*S, 0.4*S), "Right Leg") | |
59 | Instance.new("SpecialMesh",RBL).MeshType = "Sphere" | |
60 | local LBL = Part(Model, false, false, 0, 0, "Dark grey", V3(0.4*S, 0.6*S, 0.4*S), "Left Leg") | |
61 | Instance.new("SpecialMesh",LBL).MeshType = "Sphere" | |
62 | local RSH = Weld(Torso, RFL, CN(), CN(-0.1*S, 0.8*S, 0.8*S), "Right Shoulder") | |
63 | local LSH = Weld(Torso, LFL, CN(), CN(0.1*S, 0.8*S, 0.6*S), "Left Shoulder") | |
64 | local RH = Weld(Torso, RBL, CN(), CN(-0.1*S, 0.8*S, -0.8*S), "Right Hip") | |
65 | local LH = Weld(Torso, LBL, CN(), CN(0.1*S, 0.8*S, -1*S), "Left Hip") | |
66 | local Mouth = Part(Model, false, false, 0, 0, "Really black", V3(0.6*S+0.05, 0.2*S, 0.6*S)) | |
67 | Weld(Head, Mouth, CN(0, -0.25*S, -0.1), CN()) | |
68 | Instance.new("BlockMesh",Mouth).Scale = V3(1, 0.6, 0.8) | |
69 | for i = -0.25, 0.25, 0.25 do | |
70 | local Mouth2 = Part(Model, false, false, 0, 0, "Really black", V3(0.6*S+0.05, 0.3*S, 0.2*S)) | |
71 | Weld(Mouth, Mouth2, CN(0, 0.1*S, i*S), CN()) | |
72 | Instance.new("BlockMesh",Mouth2).Scale = V3(1, 0.6, 0.6) | |
73 | end | |
74 | local Nose = Part(Model, false, false, 0, 0, "Really black", V3(0.6*S+0.05, 0.2*S, 0.2*S)) | |
75 | Weld(Head, Nose, CN(0, 0.05*S, -0.1*S), CN()) | |
76 | Instance.new("BlockMesh",Nose).Scale = V3(1, 0.6, 0.6) | |
77 | for i = -0.3, 0.31, 0.6 do | |
78 | local Eye = Part(Model, false, false, 0, 0, "Really black", V3(0.6*S+0.05, 0.3*S, 0.3*S)) | |
79 | Weld(Head, Eye, CN(0, 0.15*S, (i-0.1)*S), CN()) | |
80 | local Eye2 = Part(Model, false, false, 0, 0, "Institutional white", V3(0.6*S+0.1, 0.2*S, 0.2*S)) | |
81 | Weld(Eye, Eye2, CN(0, 0.04*S, 0.04*S), CN()) | |
82 | Instance.new("BlockMesh",Eye).Scale = V3(1, 0.6, 0.6) | |
83 | Instance.new("BlockMesh",Eye2).Scale = V3(1, 0.4, 0.4) | |
84 | end | |
85 | for i = -0.4, 0.5, 0.9 do | |
86 | local Cheek = Part(Model, false, false, 0, 0, "Medium red", V3(0.6*S+0.05, 0.2*S, 0.2*S)) | |
87 | Instance.new("BlockMesh",Cheek).Scale = V3(1, 0.8, 0.8) | |
88 | Weld(Head, Cheek, CN(0, -0.05*S, (i-0.1)*S), CN()) | |
89 | end | |
90 | for i = -80, -140, -20 do | |
91 | local tail = Part(Model, false, false, 0, 0, "Dark grey", V3(0.4*S, 0.25*S, 0.3*S)) | |
92 | Weld(Torso, tail, CN(0, 0.2*S, 1.15*S) * CA(MR(i), 0, 0), CN(0, 0, 0.5*S)) | |
93 | Instance.new("BlockMesh",tail) | |
94 | end | |
95 | for i = 0, 180, 180 do | |
96 | local ear = Part(Model, false, false, 0, 0, "Dark grey", V3(0.6*S, 0.4*S, 0.5*S)) | |
97 | Instance.new("SpecialMesh",ear).MeshType = "Wedge" | |
98 | Weld(Head, ear, CN(0, 0.45*S, 0) * CA(0, MR(i), 0), CN(0, 0, -0.32*S) * CA(MR(15), 0, 0)) | |
99 | end | |
100 | local Hum = Instance.new("Humanoid") | |
101 | Hum.Name = "Humanoid" | |
102 | Hum.MaxHealth = 100 | |
103 | Hum.Health = 100 | |
104 | Hum.WalkSpeed = 11+(5*S) | |
105 | Hum.Parent = Model | |
106 | Model.Parent = workspace | |
107 | Model:MakeJoints() | |
108 | Model:MoveTo(V3(0, 2*S, 0)) | |
109 | Player.Character = Model | |
110 | local lastP = (Torso.CFrame * CN(0, 0, 0.9*S)).p | |
111 | local function runn() | |
112 | for i = 0.5, 1, 0.5 do | |
113 | RSH.C0 = CN(0, -(0.2*S)*i, 0) | |
114 | LSH.C0 = CN(0, -(0.2*S)*i, 0) | |
115 | RH.C0 = CN(0, -(0.2*S)*i, 0) | |
116 | LH.C0 = CN(0, -(0.2*S)*i, 0) | |
117 | wait() | |
118 | end | |
119 | for i = 0.5, 1, 0.5 do | |
120 | RSH.C0 = CN(0, -(0.2*S), (0.2*S)*i) | |
121 | LSH.C0 = CN(0, -(0.2*S), (0.2*S)*i) | |
122 | RH.C0 = CN(0, -(0.2*S), (0.2*S)*i) | |
123 | LH.C0 = CN(0, -(0.2*S), (0.2*S)*i) | |
124 | wait() | |
125 | end | |
126 | for i = 0.5, 1, 0.5 do | |
127 | RSH.C0 = CN(0, -(0.2*S)+(0.2*S)*i, (0.2*S)) | |
128 | LSH.C0 = CN(0, -(0.2*S)+(0.2*S)*i, (0.2*S)) | |
129 | RH.C0 = CN(0, -(0.2*S)+(0.2*S)*i, (0.2*S)) | |
130 | LH.C0 = CN(0, -(0.2*S)+(0.2*S)*i, (0.2*S)) | |
131 | wait() | |
132 | end | |
133 | for i = 0.5, 1, 0.5 do | |
134 | RSH.C0 = CN(0, 0, (0.2*S)-(0.2*S)*i) | |
135 | LSH.C0 = CN(0, 0, (0.2*S)-(0.2*S)*i) | |
136 | RH.C0 = CN(0, 0, (0.2*S)-(0.2*S)*i) | |
137 | LH.C0 = CN(0, 0, (0.2*S)-(0.2*S)*i) | |
138 | wait() | |
139 | end | |
140 | end | |
141 | local poss = "Standing" | |
142 | coroutine.resume(coroutine.create(function() | |
143 | while Player.Character == Model do | |
144 | wait(0.1) | |
145 | if poss == "Running" then | |
146 | runn() | |
147 | end | |
148 | end | |
149 | end)) | |
150 | coroutine.resume(coroutine.create(function() | |
151 | while Player.Character == Model do | |
152 | wait(0.1) | |
153 | local speed = Torso.Velocity.magnitude | |
154 | local posnow = (Torso.CFrame * CN(0, 0, 0.9*S)).p | |
155 | coroutine.resume(coroutine.create(function() | |
156 | if speed > 2 then | |
157 | poss = "Running" | |
158 | local ps = {} | |
159 | for i,v in pairs(Rainbow) do | |
160 | local a = (#Rainbow-i) | |
161 | a = ((a-(a/2))/2.5)*S | |
162 | local pp = Part(Model, true, false, 0, 0, v, V3(0.2, 0.2, 0.2), "Rainbow") | |
163 | local dist = (posnow - lastP).magnitude | |
164 | Instance.new("BlockMesh",pp).Scale = V3(1, ((1.4*S)/#Rainbow)*5, dist*5) | |
165 | pp.CFrame = CN(lastP, posnow) * CN(0, a, -dist/2) | |
166 | table.insert(ps, pp) | |
167 | end | |
168 | coroutine.resume(coroutine.create(function() | |
169 | wait(10) | |
170 | for i = 0, 1, 0.2 do | |
171 | wait() | |
172 | for _,v in pairs(ps) do | |
173 | v.Transparency = i | |
174 | end | |
175 | end | |
176 | for _,v in pairs(ps) do | |
177 | v:remove() | |
178 | end | |
179 | end)) | |
180 | else poss = "Standing" end | |
181 | end)) | |
182 | lastP = posnow | |
183 | end | |
184 | end)) | |
185 | end | |
186 | --for i,v in pairs(game.Players:GetPlayers()) do | |
187 | -- MakeNyan(v, MRA(10,120)/10) | |
188 | --end | |
189 | MakeNyan(me, 1) |