Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

i Want to fix an old tool but i can't? [closed]

Asked by 4 years ago
Edited 4 years ago

Hi i wan't to fix a tool called JetBoots because i am fixing some of the roblox games the tool is from 2008 so it is broken here is the 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 = 6



function onStart()
    print("start walking")
    walking = true
    reloadtime = 8.0

    thrust.Parent = game.Players.LocalPlayer.Character.PrimaryPart

    thrust.velocity = Vector3.new(0,velocity,0)
    thrust.maxForce = Vector3.new(0,4e+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

    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 
        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)

also i forgot to say that it is hopperbin not a tool what is the difference ?

0
You cant just throw a script at us and expect us to know whats wrong with it. What are you trying to do? Are you getting any errors? iOwn_You 543 — 4y
0
Oups I forgot , it just don't work I don't error and I don't know why it is not working it is from 2008 and there isn't any new version so I have to fix this one but as I said it doesn't error and it is very hard for me to find why it doesn't work the tool is making the player to fly for a few seconds dionsyran2 66 — 4y

Closed as Not Constructive by WideSteal321, Cynical_Innovation, and JesseSong

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?