-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJetbootsMod.lua
93 lines (68 loc) · 2 KB
/
JetbootsMod.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
--Jetboots script mod by ,,guy with nose
--Meant to go into the original Jetboots script
print("Jet Boots loaded")
bin = script.Parent
walking = false
reloadtime = 0
local thrust = Instance.new("BodyVelocity")
local velocity = 0
local max_velocity = 30
local flight_time = 999999999
function onStart()
print("start walking")
walking = true
reloadtime = 0
thrust.Parent = game.Players.LocalPlayer.Character.PrimaryPart
thrust.velocity = Vector3.new(0,velocity,0)
thrust.maxForce = Vector3.new(0,8e+003,0)
local sound = game.Players.LocalPlayer.Character.PrimaryPart:findFirstChild("JetbootSound")
if sound == nil then
sound = Instance.new("Sound")
sound.Name = "JetbootSound"
sound.SoundId = "rbxasset://sounds\\Rocket whoosh 01.wav"
sound.Looped = true
sound.Parent = game.Players.LocalPlayer.Character.PrimaryPart
end
sound:play()
end
function onEnd()
print("stop walking")
walking = false
thrust.Parent = nil
local sound = game.Players.LocalPlayer.Character.PrimaryPart:findFirstChild("JetbootSound")
if sound ~= nil then sound:stop() end
wait(reloadtime)
reloadtime = 0
end
function onButton1Down(mouse)
if reloadtime > 0 then return end
if walking == true then return end
velocity = 5
onStart()
mouse.Icon = "rbxasset://textures\\ArrowFarCursor.png"
local time = 0
while walking == true do
--onWalk()
wait(.2)
time = time + .2
--velocity = (max_velocity * (time / flight_time)) + 3
velocity = velocity + 5
thrust.velocity = Vector3.new(0,velocity,0)
if time > flight_time then onButton1Up(mouse) end
end
end
function onButton1Up(mouse)
onEnd()
mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
end
function onSelected(mouse)
print("ghostwalker selected")
if reloadtime > 0 then
mouse.Icon = "rbxasset://textures\\ArrowFarCursor.png"
else
mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
end
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
mouse.Button1Up:connect(function() onButton1Up(mouse) end)
end
bin.Selected:connect(onSelected)