View difference between Paste ID: jSNRnrxN and 7FuSTRrt
SHOW: | | - or go back to the newest paste.
1-
char = game.Players.LocalPlayer.Character
1+
-- This script has been converted to FE by iPxter
2
3-
local gui = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui)
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
			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
char = owner
88
print("Sonic Forces! Double boost!")
89
local gui = Instance.new("ScreenGui",owner.PlayerGui)
90
local text = Instance.new("TextLabel",gui)
91
text.Position = UDim2.new(0.003, 0,0.781, 0)
92
text.Size = UDim2.new(0.203, 0,0.211, 0)
93
text.BackgroundTransparency = 1
94
text.TextColor3 = Color3.new(1,1,1)
95
text.TextScaled = true
96
text.Text = "Speed: 0"
97
char.Humanoid.Animator:Destroy()
98
char.Animate:Destroy()
99
char.HumanoidRootPart.RootJoint.C1 = CFrame.new(0,0,0)
100
char.Torso["Right Hip"].C1 = CFrame.new(0,0,0)
101
for i = 0,1 ,0.03 do
102
    char.HumanoidRootPart.RootJoint.C0 = char.HumanoidRootPart.RootJoint.C0:lerp(CFrame.new(0, 0.107334137, -0.173822403, 1, 0, 0, 0, 0.940232992, -0.340532184, 0, 0.340532184, 0.940232992):inverse(),i)
103
    char.Torso["Right Hip"].C0 = char.Torso["Right Hip"].C0:lerp(CFrame.new(0.5, -1.87479305, -0.59992981, 1, 0, 0, 0, 0.916532993, -0.399959058, 0, 0.399958998, 0.916533113),i)
104
    game:GetService("RunService").RenderStepped:wait()
105
end
106
char.Humanoid.WalkSpeed = 0
107
local boost = Instance.new("Sound",char)
108
boost.SoundId = "rbxassetid://1192337951"
109
boost.Volume = 4
110
boost.Looped = true
111
boost:Play()
112
coroutine.wrap(function()
113
    while true do
114
        wait(0.01)
115
        if boost.Parent == nil then
116
            boost.Parent = char
117
        end
118
    end
119
end)()
120
wait(5)
121
local boostp = Instance.new("Part",char)
122
boostp.BrickColor = BrickColor.new("Electric blue")
123
boostp.Transparency = 0.5
124
local boostm = Instance.new("FileMesh",boostp)
125
boostm.MeshId = "http://www.roblox.com/asset/?id=16150864"
126
boostm.Scale = Vector3.new(5,5,5)
127
local boostw = Instance.new("Weld",boostp)
128
boostw.Part0 = boostp
129
boostw.Part1 = char.Torso
130
boostw.C0 = CFrame.new(0.00974273682, 0.00136947632, -0.455072403, 0.998052895, -0.024946643, 0.0571669154, 0.0573021285, 0.00473886728, -0.998345733, 0.0246344674, 0.999677718, 0.00615915656)
131
local booste = Instance.new("Sound",char)
132
booste.SoundId = "rbxassetid://1295449565"
133
booste.Looped = true
134
booste.Volume = 2
135
booste:Play()
136
local boost2 = Instance.new("Sound",char)
137
boost2.Volume = 4
138
boost2.SoundId = "rbxassetid://1295446488"
139
boost2:Play()
140
lhandweld = char.Torso["Left Shoulder"]
141
rhandweld = char.Torso["Right Shoulder"]
142
llegweld = char.Torso["Left Hip"]
143
rlegweld = char.Torso["Right Hip"]
144
lhandweld.C1 = CFrame.new(0,0,0)
145
rhandweld.C1 = CFrame.new(0,0,0)
146
llegweld.C1 = CFrame.new(0,0,0)
147
rlegweld.C1 = CFrame.new(0,0,0)
148
local trail = Instance.new("Trail",char)
149
trail.Color = ColorSequence.new(boostp.BrickColor.Color)
150
trail.Lifetime = 0.5
151
local attachment0 = Instance.new("Attachment",char.Head)
152
attachment0.Name = "TrailAttachment0"
153
local attachment1 = Instance.new("Attachment",char.HumanoidRootPart)
154
attachment1.Name = "TrailAttachment1"
155
trail.Attachment0 = attachment0
156
trail.Attachment1 = attachment1
157
local newvel = Instance.new("BodyVelocity")
158
        newvel.Parent = char.Torso
159
        newvel.maxForce = Vector3.new(100000,3000,100000)
160
        newvel.velocity =  newvel.Parent.CFrame.lookVector*100
161
        newvel.Name = "SuperRun"
162
char.Torso.Touched:connect(function(part)
163
    local human = part.Parent:FindFirstChildOfClass("Humanoid")
164
    if human then
165
        human.Parent:BreakJoints()
166
    end
167
end)
168
coroutine.wrap(function()
169
    while true do
170
        wait(0.01)
171
        for i = 1,40 do
172
            wait()
173
            newvel.velocity =  newvel.Parent.CFrame.lookVector* math.random(100,1000)
174
            text.Text = "Speed: " .. math.random(100,1000)
175
        end
176
    end
177
end)()
178
while true do
179
    wait(0.01)
180
    char.Humanoid.WalkSpeed = math.random(100,200)
181
    for i = 0,1 ,0.3 do
182
        lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.273401737, 0.445701599, 1, 0, 0, 0, 0.453197539, 0.891410112, 0, -0.891410232, 0.453197569),i)
183
        llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.53495121, -0.844882965, 1, 0, 0, 0, 0.534950972, -0.844883084, 0, 0.844883084, 0.534951091),i)
184
        rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.313892841, 0.464073181, 1, 0, 0, 0, 0.37221545, 0.928146303, 0, -0.928146362, 0.372215509),i)
185
        rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.59347343, 0.804859161, 1, 0, 0, 0, 0.593472898, 0.804853976, 0, -0.804854035, 0.593472958),i)
186
        game:GetService("RunService").RenderStepped:wait()
187
    end
188
    for i = 0,1 ,0.3 do
189
        llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.63476276, 0.772708893, 1, 0, 0, 0, 0.63476181, 0.77270782, 0, -0.77270788, 0.63476187),i)
190
        rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.49659729, -0.867980957, 1, 0, 0, 0, 0.496596336, -0.867981553, 0, 0.867981672, 0.496596336),i)
191
        game:GetService("RunService").RenderStepped:wait()
192
    end
193
end