Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local event
- local degree = 0
- local deltaDeg = math.pi/20
- local minDeg = -0.3*math.pi
- local maxDeg = 0.3*math.pi
- local function shot()
- while true do
- local tag = string.format("{Motion:[0:%fd,1:%fd,2:%fd]}",math.sin(degree)+0.001,0.2,math.cos(degree)+0.001)
- commands.summon("Arrow","~","~1","~",tag)
- if (minDeg and degree + deltaDeg < minDeg) or (maxDeg and degree + deltaDeg > maxDeg) then
- deltaDeg = -deltaDeg
- end
- sleep(0.1)
- degree = degree + deltaDeg
- end
- end
- local function stop()
- os.pullEvent("char")
- end
- parallel.waitForAny(shot,stop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement